Hello Friends Welcome to GSWSServices GSWS Services Blog Provides you content Regarding GSWS and CSC Services. i am dedicated to provide the updates to you.so,i will keep posting the more important posts on my blog.Please give your support. Thank you for Visiting my Blog.
Closing a File &File Properties in Python Programming
Closing a File:
After completing our operations on the file,it is highly recommended to close the file. For this we have to use close() function.
f.close()
Various properties of File Object:
Once we opened a file and we got file object, we can get various details related to that file by using its properties.\
name → Name of opened file
mode → Mode in which the file is opened
closed→ Returns boolean value indicates that file is closed or not
readable()→ Retruns boolean value indicates that whether file is readable or not
writable()→ Returns boolean value indicates that whether file is writable or not.
File Handling in Python Programming
-->As part of programming requirement, we have to store our data permanently for future purpose. For this requirement we should go for files. Files are very common permanent storage areas to store our data.
Types of Files:
There are two types of files
1.Text Files:
Usually we can use text files to store character data
Example:abc.txt
2. Binary Files:
Usually we can use binary files to store binary data like images, video files, audio files etc.
Example:abc.png
Opening a File:
-->Before performing any operation (like read or write) on the file, first we have to open that file. For this we should use Python's inbuilt function open()
-->But at the time of open, we have to specify mode, which represents the purpose of opening file.
f= open(filename, mode)
The allowed modes in Python are
1. r→ open an existing file for read operation. The file pointer is positioned at the beginning of the file.If the specified file does not exist then we will get
FileNotFoundError. This is default mode.
2. w→ open an existing file for write operation. If the file already contains some data then it will be overridden. If the specified file is not already available then this mode will create that file.
3. a→ open an existing file for append operation. It won't override existing data.If the specified file is not already available then this mode will create a new file.
4. r+ → To read and write data into the file. The previous data in the file will not be deleted. The file pointer is placed at the beginning of the file.
5. w+ → To write and read data. It will override existing data.
6. a+ → To append and read data from the file.It wont override existing data.
7. x→ To open a file in exclusive creation mode for write operation. If the file already exists then we will get FileExistsError.
Note: All the above modes are applicable for text files. If the above modes suffixed with 'b' then these represents for binary files.
Example: rb,wb,ab,r+b,w+b,a+b,xb
f= open("abc.txt", "w")
We are opening abc.txt file for writing data.
NPCI Status and Aadhaar Linked Mobile Number
Bank, Aadhaar Details Link with NPCI :
The Department of Village and Ward Secretariats has undertaken a special program to link the bank account and Aadhaar details of every person above the age of 18 in the state with the National Payment Corporation of India (NPCI).
Currently which Bank is Link with Aadhaar
https://resident.uidai.gov.in/bank-mapper
To Know Which Mobile Number Linked with Aadhaar
https://myaadhaar.uidai.gov.in/check-aadhaar-validity/en
Escape Characters in Python
--> In String literals we can use escape characters to associate a special meaning.
>>>s="siddu\nsoftware"
>>> print(s)
durga
software.
>>>s="siddu\tsoftware"
>>> print(s) #siddu software
>>>s="This is " symbol"
File "<stdin>", line 1
s="This is "symbol"
SyntaxError: invalid syntax
>>>s="This is \" symbol"
>>> print(s)
This is "symbol
-->The following are various important escape characters in Python
\n===>New Line
\t===>Horizontal tab
\r===>Carriage Return
\b===>Back space
\f===>Form Feed
\V==>Vertical tab
\'>Single quote
\">Double quote
\\===>back slash symbol
None Data Type and Constants in Python
-->None means Nothing or No value associated.
-->If the value is not available, then to handle such type of cases None introduced. It is something like null value in Java.
Example:
def n1(): a=10
print(n1())
None
Constants
-->Constants concept is not applicable in Python.
-->But it is convention to use only uppercase characters if we don't want to change value.
MAX_VALUE=10
-->It is just convention but we can change the value.
Andhra Pradesh is now OPEN with new best policies
-->Govt of AP inviting you to invest in our state, where we have rolled out a red carpet to welcome you.
-->In AP, a business-friendly state government, talented youngsters and robust infrastructure await you.
-->The new policy framework has been designed based on comprehensive consultations with Industry veterans.
-->The policy framework aims to foster businesses and a spirit of entrepreneurship in our state. We're building the best business ecosystem in the country.
-->Govt personally want to assure you that the GoAP will take every step to help you set a base in AP and grow.
-->There's never been a better time to invest in India, there's never been a better time to invest in Andhra Pradesh!
-->Collaborate with us on this exciting growth journey, where we can expand both - your business horizons and our state's potential.
Looking forward to seeing you in Andhra Pradesh!
Birth & Death Registration Rules 2026
జనన, మరణాà°² నమోà°¦ు à°µిà°·à°¯ంà°²ో 2026 à°…à°•్à°Ÿోబర్ 1 à°¨ుంà°šి à°•ొà°¤్à°¤ à°¨ిà°¬ంధనలు అమల్à°²ోà°•ి à°°ాà°¨ుà°¨్à°¨ాà°¯ి. 🔹 21 à°°ోà°œుà°²్à°²ోà°ªు: à°¸ాà°§ాà°°à°£ à°°ిà°œిà°¸్à°Ÿ్à°°ేà°·à°¨్ 🔹 21 à°°ోà°œుà°² తర్à°µాà°¤...
-
Application Forms for AP Seva Portal Services. 👉CheckSlip For CASTE&Income CheckSlip 👉 Income Application Form Income 👉 Integr...
-
-->The newly developed NBM (Innovation Benefit Management Portal) website has been designed. --To check the eligibility of each scheme....
-
-->Government have decided to provide platform for the job seekers duly updating their qualifications and Private Organisations to engage...








