SlideShare a Scribd company logo
1 of 118
File Handling in
Python
x=open(“Smahi.txt”,
“w”)
A file memory x created in RAM, and get
connected to a file called “Smahi.txt” in
overwrite mode, which is available in
same folder, if the file not found, it will be
created automatically.
x=open(“Smahi.txt”,“w”)
x.write(“Debanshi ” )
A file memory x created in RAM, and get
connected to a file called “Smahi.txt”, in
overwrite mode, which is available in
same folder, if the file not found, it will be
created automatically. A string called
“Debanshi ” is written in file memory.
x=open(“Smahi.txt”, “w”)
x.write(“Debanshi ” )
x.close()
A file memory x created in RAM, and get
connected to a file called “Smahi.txt”,
which is available in same folder, if the file
not found, it will be created automatically.
A string called “Debanshi ” is written in
file memory. Now to transfer the contents
of the file memory to the file “Smahi.txt”
we have to disconnect the file memory x
with “Smahi.txt” using the close()
x=open(“Smahi.txt”, “w”)
y=“Debanshi ”
x.write(y)
x.close()
A string variable y is created and
initialized with “Debanshi ”, after
that the same is written in file
memory x from which the contents is
transferred to the file “Smahi.txt”
using the function close()
x=open(“Smahi.txt”, “w”)
y=“Debanshi ”
x.write(y)
x.close()
Remember we can
store only string in
file
x=open(“Smahi.txt”, “w”)
y=23759
x.write(y)
x.close()
Argument of write()
must be str not int.
x=open(“Smahi.txt”, “w”)
x.write(“Debanshi ”)
x.write(“Sampurna ”)
x.close()
Output:
Debanshi Sampurna
x=open(“Smahi.txt”, “w”)
x.write(“Debanshi n”)
x.write(“Sampurna ”)
x.close()
Output:
Debanshi
Sampurna
x=open(“Smahi.txt”, “w”)
x.write(“Debanshi t”)
x.write(“Sampurna ”)
x.close()
Output:
Debanshi Sampurna
x=open(“Smahi.txt”, “w”)
x.writelines(“Debanshi ”)
x.writelines(“Sampurna ”)
x.close()
Another technique to
write in a file
x=open(“Smahi.txt”, “w”)
x.writelines(“Debanshi ”)
x.writelines(“Sampurna ”)
x.close()
Output:
Debanshi Sampurna
x=open(“Smahi.txt”, “w”)
x.writelines(“Debanshi n”)
x.writelines(“Sampurna ”)
x.close()
Output in a file:
Debanshi
Sampurna
x=open("Smahi.txt","w")
y=["Debanshi","Sampurna","Riya
"]
x.write(y)
x.close()
Argument in write
must be string, not list
Its Okay, Output will
be
Debanshi Sampurna Riya
write() is used to
write string,
whereas writelines()
is used to write list
or string
x=open("Smahi.txt","w")
for y in range(4):
x.write(input("Enter name "))
x.close()
Program will accept 4
names and store in a
file called “Smahi.txt”
x=open("Smahi.txt","w")
for y in range(4):
x.write(input("Enter name
")+‘n’)
x.close()
Program will accept 4
names and store in a file
in separate lines, called
“Smahi.txt”
x=open("Smahi.txt","w")
for y in range(4):
x.write(input("Enter name
")+‘n’)
x.close()
Program will accept 4
names and store in a file
in separate lines, called
“Smahi.txt”
x=open("Smahi.txt","w")
z=[]
for y in range(4):
z.append(input("Enter name
")+'n')
x.writelines(z)
x.close()
Program will accept 4 names
and store in a file in separate
lines, called “Smahi.txt”
x=open("Smahi.txt","w")
z=[]
for y in range(4):
z[y].append(input("Enter name ")+'n')
x.writelines(z)
x.close()
Error:
Instead of z[y], we have to
write z
x=open("Smahi.txt","w")
z=[]
for y in range(4):
z.append(input("Enter name ")+'n')
x.write(z)
x.close()
Error:
write() is used to input string
not the list
w is used to create
the file in overwrite
mode, whereas a is
used to create the
file in append mode
x=open("Smahi.txt","a")
z=[]
for y in range(4):
z.append(input("Enter name
")+'n')
x.writelines(z)
x.close()
Initially if the file contains
Amit
Sumit
New names will be added after
Sumit
x=open("Smahi.txt","a")
z=[]
for y in range(4):
z.append(input("Enter name
")+'n')
x.writelines(z)
x.close()
Initially if the file contains
nothing, New names will be
added from beginning of the
file
Reading from a file
x=open("Smahi.txt",“r")
y=x.read()
print(y)
x.close()
Output:
Ram
Shyam
Let the contents of the file Smahi.txt is
Ram
Shyam
Warning
If the file we are trying to
open for reading is not
present in the disk, in
that case it will show
error
x=open("Smahi.txt",“r")
y=x.read(2)
print(y)
x.close()
Output:
Ra
Let the contents of the file Smahi.txt is
Ram
Shyam
x=open("Smahi.txt",“r")
y=x.read(3)
print(y)
x.close()
Output:
Ram
Let the contents of the file Smahi.txt is
Ram
Shyam
x=open("Smahi.txt",“r")
y=x.read(4)
print(y)
x.close()
Output:
Ram
Let the contents of the file Smahi.txt is
Ram
Shyam
x=open("Smahi.txt",“r")
y=x.read(5)
print(y)
x.close()
Output:
Ram
S
Let the contents of the file Smahi.txt is
Ram
Shyam
x=open("Smahi.txt",“r")
y=x.read(3)
print(y)
y=x.read(5)
print(y)
x.close() Output:
Ram
Shya
Let the contents of the file Smahi.txt is
Ram
Shyam
x=open("Smahi.txt",“r
")
y=x.read(3)
Here data type of y
will be string
x=open("Smahi.txt",“r")
y=x.readline()
print(y)
x.close()
Output:
Ram
Let the contents of the file Smahi.txt is
Ram
Shyam
Ajay
x=open("Smahi.txt",“r")
y=x.readline(2)
print(y)
x.close()
Output:
Ra
Let the contents of the file Smahi.txt is
Ram
Shyam
Ajay
x=open("Smahi.txt",“r")
y=x.readline()
print(y)
y=x.readline()
print(y)
x.close()
Output:
Ram
Shyam
Let the contents of the file Smahi.txt is
Ram
Shyam
Ajay
x=open("Smahi.txt",“r")
y=x.readline()
Here data type
of y is string
x=open("Smahi.txt",“r")
y=x.readlines()
print(y)
x.close()
Output:
['Ramn','Shyamn’,]
Let the contents of the file Smahi.txt is
Ram
Shyam
Ajay
x=open("Smahi.txt",“r")
y=x.readlines()
print(y)
x.close()
Output:
['Ramn', 'Shyamn’, ‘Ajayn’]
Let the contents of the file Smahi.txt is
Ram
Shyam
Ajay
x=open("Smahi.txt",“r")
y=x.readlines()
Here data type
of y is list
x=open("Smahi.txt")
for y in x:
print(y)
x.close()
output
Ram
Shyam
Ajay
x=open("Smahi.txt")
for y in x:
print(y)
x.close()
output
Here y is working Ram
like read or readline
Shyam
????????............ Ajay
x=open("Smahi.txt")
output
z=1 Ram
for y in x: 1
print(y) Shyam
print(z) 2
z=z+1 Ajay
x.close() 3
its working like
readline
Using “with” any
opened file can be
closed automatically
after accepting data
from the file no need
of using close( )
with open("Smahi.txt") as
x:
y=x.read()
print(y)
output
Ram
Shyam
Ajay
with open("Smahi.txt") as
x:
y=x.read()
print(y[0])
output
R
with open("Smahi.txt") as
x:
y=x.read()
print(type(y))
output
str
Using “with” while
writing in a file
with open(“Smahi.txt” , “w”) as x:
x.write(“Hello Sampurna”)
x=open("Smahi.txt","w")
y=[ ]
a=int(input("Enter total number"))
for z in range(a):
y.append(input(“Number
")+"n")
x.writelines(y)
x.close()
x=open("Smahi.txt","r")
y=x.readlines()
m=0
z=0
while z<len(y):
print(int(y[z]),end=' ')
if int(y[z])>m:
m=int(y[z])
z=z+1
print("Largest number is ",m)
x.close()
x=open("Smahi.txt","r")
y=x.readlines()
m=0
z=0
print("Entered number was n")
while z<len(y):
print(int(y[z]),end=' ')
m=m+int(y[z])
z=z+1
print("nSum is ",m)
x.close()
x=open("Smahi.txt","r")
y=x.readlines()
m,z=0,0
print("Entered number was n")
while z<len(y):
print(int(y[z]),end=' ')
if int(y[z])%2==0:
m=m+1
z=z+1
print("Total even numbers are",
m)
x.close()
x=open("Smahi.txt","r")
y=x.readlines()
m,z=0,0
print("Entered number was n")
while z<len(y):
print(int(y[z]),end=' ')
if int(y[z])%2!=0:
m=m+1
z=z+1
print("Total odd numbers are", m)
x.close()
BINARY FILES
A binary file is a
computer file that is
not a text file. The
term “binary file” is
often used as a term
meaning
“Non text file”
Generally a binary
file is created to store
list, tuples,
dictionaries and
nested list.
In Binary files 1st the
data are serialized
and then stored.
Serialization is the
process in which the list,
tuples and the
dictionaries are
converted into byte
stream and then stored in
the file
Pickling converts an
object in byte stream in
such a way that it can be
reconstructed in original
form when un - pickled or
de - serialized
In order to work with
pickle module, we
must 1st import it
using syntax
import pickle
In pickle module there
are two functions
dump() and load(), 1st
one is used to store the
data in file and the 2nd
is used to access data
from the file
Storing data in binary file
import pickle
emp1={'name':"amit", "age":23}
emp2={'name':"sumit", "age":38}
emp3={'name':"ajay", "age":18}
em=open("emp.dat","wb")
pickle.dump(emp1,em)
pickle.dump(emp2,em)
pickle.dump(emp3,em)
print("Data dumped-written in file....
")
em.close()
Accessing data from binary file
import pickle
emp={}
em=open("emp.dat","rb")
try:
while True:
emp=pickle.load(em)
print(emp)
except EOFError:
em.close()
Accessing data from binary file
import pickle
emp={}
em=open("emp.dat","rb")
print("Name Age")
try:
while True:
emp=pickle.load(em)
print(emp['name'],'t',emp['age'])
except EOFError:
em.close()
Accessing selected data from binary file
import pickle
emp={ }
em=open("emp.dat","rb")
m=0
print("Name Age")
try:
while True:
emp=pickle.load(em)
if emp['age']>m:
m=emp['age']
n=emp['name']
except EOFError:
em.close()
print(n, m)
Let the content of the file Smahi.txt is : -
Ram
Shyam
Ajay
Manoj
Rajeev
x=open("Smahi.txt")
y=x.tell()
print(y) Output
0
Let the content of the file Smahi.txt is : -
Ram
Shyam
Ajay
Manoj
Rajeev
x=open("Smahi.txt") Output
y=x.tell()
print(y) 0
z=x.read(2)
y=x.tell()
print(y) 2
: -
Ram
Shyam
Ajay
Manoj
Rajeev
x=open("Smahi.txt")
z=x.read()
y=x.tell()
OUTPUT
print(y) 33
: -
Ram
Shyam
Ajay
Manoj
Rajeev
x=open("Smahi.txt")
z=x.readline()
y=x.tell()
OUTPUT
print(y) 5
Let the content of the file Smahi.txt is :
-
Ram
Shyam
Ajay
Manoj
Rajeev
x=open("Smahi.txt")
z=x.readline()
z=x.readline()
y=x.tell() OUTPUT
print(y) 12
Let the content of the file Smahi.txt is :
-
Ram
Shyam
Ajay
Manoj
Rajeev
x=open("Smahi.txt")
z=x.readline()
z=x.readline()
y=x.tell() OUTPUT
print(y) 12
seek( )
Let the content of the file Smahi.txt is :
-
Ram
Shyam
Ajay
Manoj
Rajeev
x=open("Smahi.txt") OUTPUT
y=x.tell() 0
print(y) 2
x.seek(2)
y=x.tell()
print(y)
Let the content of the file Smahi.txt is :
-
Ram
Shyam
Ajay
x=open("Smahi.txt") Manoj
y=x.tell() Rajeev
print(y)
x.seek(12) OUTPUT
z=x.read(5) 0
print(z) Ajay
y=x.tell()
print(y) 18
Let the content of the Ram
file Smahi.txt is : - Shyam
Ajay
x=open("Smahi.txt") Manoj
y=x.tell() OUTPUT Rajeev
print(y) 0
x.seek(12)
z=x.read(6)
print(z) Ajay
y=x.tell()
print(y) 19
Let the content of the file Smahi.txt is :
-
Ram
Shyam
Ajay
x=open("Smahi.txt") Manoj
y=x.tell() Rajeev
print(y)
m=x.read(8) OUTPUT
print(m) ERROR
x.seek(-5) indexing is
y=x.tell() always
print(y) positive
-
Ram
x=open("Smahi.txt") Shyam
x.seek(12) Ajay
print(x.tell()) Manoj
x.seek(-5,2) Rajeev
print(x.tell())
x.close()
Error: - Cursor movement is allowed
from beginning of the file only. Then
how to move the cursor from any
where ?????
Open the
text file in
binary mode
Let the content of the file Smahi.txt is :
-
Ram
x=open("Smahi.txt", "rb") Shyam
x.seek(12) Ajay
print(x.tell()) Manoj
x.seek(-5,2) Rajeev
print(x.tell())
x.close()
Okay: - Cursor movement is allowed
from any where in “BINARY FILE”
Let the content of the file Smahi.txt is :
-
Ram
em=open("Smahi.txt","rb") Shyam
z=em.read() Ajay
print(em.tell()) Manoj
em.seek(0,2) Rajeev
print(em.tell())
em.close() OUTPUT
33
33
0 moves from beginning
1 moves from current
position
2 moves from end
“END” Ram
em=open("Smahi.txt","rb")
Shyam
em.seek(0,2) Ajay
print(em.tell()) Manoj
em.seek(4,2) Rajeev
print(em.tell())
em.seek(-4,2)
print(em.tell())
OUTPUT
em.close() 33
37
29
em=open("Smahi.txt","rb")
Shyam
em.seek(0,1) Ajay
print(em.tell()) Manoj
em.seek(14,1)
Rajeev
print(em.tell())
OUTPUT
em.seek(-4,1) 0
print(em.tell()) 14
em.seek(3,1) 10
print(em.tell()) 13
em.close()
em=open("Smahi.txt","rb")
Shyam
em.seek(0,0) Ajay
print(em.tell()) Manoj
em.seek(14,0)
Rajeev
print(em.tell())
em.seek(-4,0)
print(em.tell())
OUTPUT
em.close() 0
14
Error
“Start” Ram
em=open(“Smahi.txt","rb+")
Shyam
em.seek(100,0) Ajay
print(em.tell()) Manoj
em.close() Rajeev
OUTPUT
100
Here size of the file is 33 bytes, but if
we want to move beyond the limit, its
allowed but the size of the file does
not changes.
Let the content of the file Smahi.txt is : -
Ram
em=open(“Smahi.txt","rb+")Shyam
x=em.read() Ajay
print(em.tell()) Manoj
em.seek(100,0) Rajeev
print(em.tell()) OUTPUT
em.seek(0,0) 33
print(em.tell()) 100
y=em.read() 0
print(len(x)) 33
print(len(y)) 33
em.close() BUT……….
If we move the file
pointer beyond the
limit and tried to write
anything, REMEMBER
the same will be written
at that point and the
size of the file will
expand.
em=open(“Smahi.txt","rb+")
em.seek(0,2)
OUTPUT
print(em.tell()) 33
em.seek(100,0)
print(em.tell()) 100
em.seek(0,2)
print(em.tell()) 33
em.close()
em=open(“Smahi.txt","rb+")
em.seek(0,2) OUTPUT
print(em.tell()) 33
em.seek(100,0)
print(em.tell()) 100
em.write(b"Ramu")
em.seek(0,2)
print(em.tell()) 104
em.close()
Storing data in binary file
import pickle
emp1={'name':"amit", "age":23}
emp2={'name':"sumit", "age":38}
emp3={'name':"ajay", "age":18}
em=open("emp.dat","wb")
pickle.dump(emp1,em)
pickle.dump(emp2,em)
pickle.dump(emp3,em)
print("Data dumped-written in file....
")
em.close()
Seek and Tell on Binary files
import pickle
emp={ }
em=open("emp.dat","rb")
print(em.tell())
try:
while True:
OUTPUT
emp=pickle.load(em) 0
print(em.tell()) 42
except EOFError: 85
em.close() 127
Seek and Tell on Binary files
import pickle
emp={}
bmp=[]
em=open("emp.dat",'rb')
try:
while True:
emp=pickle.load(em)
bmp.append(em.tell())
except EOFError:
em.close()
print(bmp) [42, 85,
127]
Seek and Tell on Binary files
import pickle z=0
emp={} em=open("emp.dat",'rb')
bmp=[] emp=pickle.load(em)
em=open("emp.dat",'rb') print(emp)
try: while z<len(bmp)-1:
while True:
em.seek(bmp[z])
emp=pickle.load(em)
emp=pickle.load(em)
bmp.append(em.tell()) print(emp)
except EOFError: z=z+1
em.close() em.close()
Modifying the contents of a binary file
import pickle
x=input("Please enter name to be modified ")
y=open("emp.dat","rb+")
a={ }
try:
while True:
z=y.tell()
a=pickle.load(y)
if a['name']==x:
print(a['name'],' ',a['age'])
a['age']+=5
y.seek(z)
pickle.dump(a,y)
except EOFError:
y.close()
1)
import pickle
y=open("emp.dat","rb+")
a={}
try:
while True:
a=pickle.load(y)
print(a['name'],' ',a['age'])
except EOFError:
y.close()
continued ………… go to next
slide
Modifying the contents of a binary file (Page 2)
x=input("nnPlease enter name to be modified ")
y=open("emp.dat","rb+")
a={ }
k=0
try:
while True:
z=y.tell()
a=pickle.load(y)
if a['name']==x:
print("Name found ")
a['age']=int(input("Enter new age "))
y.seek(z)
pickle.dump(a,y)
k=1
except EOFError:
y.close()
if k==0:
print("Sorry ",x," not found ") continued ……… go to next
slide
Modifying the contents of a binary file (Page 3)
y=open("emp.dat","rb+")
a={}
try:
while True:
a=pickle.load(y)
print(a['name'],' ',a['age'])
except EOFError:
y.close()
emp={}
em=open("emp.dat","ab")
x=1
while x==1:
emp['name']=input("Please enter name
")
emp['age']=int(input("Please enter age
"))
pickle.dump(emp,em)
x=int(input("Please enter 1 to continue
"))
print("Data dumped-written in file.... ")
em.close()
Deleting records from a binary file (Slide
1)
import os
import pickle
y=open("emp.dat","rb+")
a={}
try:
while True:
a=pickle.load(y)
print(a['name'],' ',a['age'])
except EOFError:
y.close()
Continued………... Goto Next
Slide
Deleting records from a binary file (Slide 2)
x=input("nnEnter name to be deleted ")
y=open("emp.dat","rb+")
z=open("bmp.dat","wb+")
a={}
b=0
try:
while True:
a=pickle.load(y)
if a['name']!=x:
pickle.dump(a,z)
else:
b=1
except EOFError:
y.close()
z.close()
if b==1:
print("Data found, and deleted ")
else:
print("Deletion not possible ")
os.remove("emp.dat")
os.rename("bmp.dat","emp.dat") Continued………...
Goto Next Slide
Deleting records from a binary file (Slide
3)
y=open("emp.dat","rb+")
a={}
try:
while True:
a=pickle.load(y)
print(a['name'],' ',a['age'])
except EOFError:
y.close()
def enter():
import pickle
emp={}
em=open("stud.dat","wb")
x=1
for xx in range(25):
print("n")
emp['name']=input("Please enter name ")
emp['roll']=int(input("Please enter roll "))
emp['marks']=int(input("Please enter marks
"))
pickle.dump(emp,em)
print("Data dumped-written in file.... ")
em.close()
def display():
import pickle
emp={}
em=open("stud.dat","rb+")
for xx in range(25):
print("n")
print("Name roll marks")
try:
while True:
emp=pickle.load(em)
print(emp['name'],emp['roll'],emp['marks'])
except EOFError:
em.close()
def modify():
import pickle
for xx in range(25):
print("n")
x=input("Please enter name to be modified ")
y=open("stud.dat","rb+")
a={}
try:
while True:
z=y.tell()
a=pickle.load(y)
if a['name']==x:
print("Data found ")
print(a['name'],' ',a['marks'], ' ',a['roll'])
print(".......and modified ")
a['marks']+=5
y.seek(z)
pickle.dump(a,y)
except EOFError:
y.close()
def adding():
import pickle
emp={}
em=open("stud.dat","ab")
x=1
for xx in range(25):
print("n")
emp['name']=input("Please enter name ")
emp['roll']=int(input("Please enter roll "))
emp['marks']=int(input("Please enter marks
"))
pickle.dump(emp,em)
print("Data dumped-written in file.... ")
em.close()
ch='y'
while ch=='y':
x=int(input("Enter
n1..overwriten2..appendn3..displayn4..modify
marksn5..exit from a file "))
if x==1:
enter()
if x==2:
adding()
if x==3:
display()
if x==4:
modify()
if x==5:
break
ch=input("Press y to continue ")
csv
files
Comma
Separated
Values
Creating csv files
import csv
x=open("abc.csv","w"
)
x.close()
Creating csv files
import csv
x=open("abc.csv","w")
y=csv.writer(x)
z=(1,"amit",10)
y.writerow(z)
x.close()
Creating csv files
import csv
x=open("abc.csv","w")
y=csv.writer(x)
z=(1,"amit",10)
y.writerow(z)
z=(2,"sumit",11)
y.writerow(z)
z=(3,"ajay",12)
y.writerow(z)
z=(4,"sanjay",13)
y.writerow(z)
x.close()
Creating csv files
import csv
x=open("abc.csv","w")
y=csv.writer(x)
z=[1,"amit",10]
y.writerow(z)
z=[2,"sumit",11]
y.writerow(z)
z=[3,"ajay",12]
y.writerow(z)
z=[4,"sanjay",13]
y.writerow(z)
x.close()
Creating csv files
import csv
x=open("abc.csv","w")
y=csv.writer(x)
z=[1,"amit",10]
y.writerow(z)
z=(2,"sumit",11)
y.writerow(z)
z=[3,"ajay",12]
y.writerow(z)
z=(4,"sanjay",13)
y.writerow(z)
x.close()
Creating csv files
import csv
x=open("abc.csv","w")
y=csv.writer(x)
y.writerow(["Roll","Name","Marks"])
z=[1,"amit",10]
y.writerow(z)
z=(2,"sumit",11)
y.writerow(z)
z=[3,"ajay",12]
y.writerow(z)
z=(4,"sanjay",13)
y.writerow(z)
x.close()
Creating csv files
import csv
x=open("abc.csv","w")
y=csv.writer(x)
y.writerow(["Roll","Name","Marks"])
for m in range(5):
r=int(input("Roll Please "))
n=input("Name Please ")
m=int(input("Marks Please "))
y.writerow([r,n,m])
x.close()
Creating csv files
import csv
x=open("abc.csv","w")
y=csv.writer(x)
y.writerow(["Roll","Name","Marks"])
LIST=[]
for m in range(3):
r=int(input("Roll Please "))
n=input("Name Please ")
m=int(input("Marks Please "))
LIST.append([r,n,m])
y.writerows(LIST)
x.close()

More Related Content

Similar to 10 Python file.pptx

File Handling in python.docx
File Handling in python.docxFile Handling in python.docx
File Handling in python.docxmanohar25689
 
FILE INPUT OUTPUT.pptx
FILE INPUT OUTPUT.pptxFILE INPUT OUTPUT.pptx
FILE INPUT OUTPUT.pptxssuserd0df33
 
Filesinc 130512002619-phpapp01
Filesinc 130512002619-phpapp01Filesinc 130512002619-phpapp01
Filesinc 130512002619-phpapp01Rex Joe
 
FIle Handling and dictionaries.pptx
FIle Handling and dictionaries.pptxFIle Handling and dictionaries.pptx
FIle Handling and dictionaries.pptxAshwini Raut
 
FILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUS
FILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUSFILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUS
FILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUSVenugopalavarma Raja
 
FILE HANDLING in python to understand basic operations.
FILE HANDLING in python to understand basic operations.FILE HANDLING in python to understand basic operations.
FILE HANDLING in python to understand basic operations.ssuser00ad4e
 
15. Streams Files and Directories
15. Streams Files and Directories 15. Streams Files and Directories
15. Streams Files and Directories Intro C# Book
 
File handling in Python
File handling in PythonFile handling in Python
File handling in PythonMegha V
 
CHAPTER 2 - FILE HANDLING-txtfile.pdf is here
CHAPTER 2 - FILE HANDLING-txtfile.pdf is hereCHAPTER 2 - FILE HANDLING-txtfile.pdf is here
CHAPTER 2 - FILE HANDLING-txtfile.pdf is heresidbhat290907
 
Data file handling in c++
Data file handling in c++Data file handling in c++
Data file handling in c++Vineeta Garg
 
Java Input Output and File Handling
Java Input Output and File HandlingJava Input Output and File Handling
Java Input Output and File HandlingSunil OS
 
File handling3 (1).pdf uhgipughserigrfiogrehpiuhnfi;reuge
File handling3 (1).pdf uhgipughserigrfiogrehpiuhnfi;reugeFile handling3 (1).pdf uhgipughserigrfiogrehpiuhnfi;reuge
File handling3 (1).pdf uhgipughserigrfiogrehpiuhnfi;reugevsol7206
 

Similar to 10 Python file.pptx (20)

File Handling in python.docx
File Handling in python.docxFile Handling in python.docx
File Handling in python.docx
 
Python File functions
Python File functionsPython File functions
Python File functions
 
FILE INPUT OUTPUT.pptx
FILE INPUT OUTPUT.pptxFILE INPUT OUTPUT.pptx
FILE INPUT OUTPUT.pptx
 
Files nts
Files ntsFiles nts
Files nts
 
Filesinc 130512002619-phpapp01
Filesinc 130512002619-phpapp01Filesinc 130512002619-phpapp01
Filesinc 130512002619-phpapp01
 
Files in c++
Files in c++Files in c++
Files in c++
 
FIle Handling and dictionaries.pptx
FIle Handling and dictionaries.pptxFIle Handling and dictionaries.pptx
FIle Handling and dictionaries.pptx
 
FILE HANDLING.pptx
FILE HANDLING.pptxFILE HANDLING.pptx
FILE HANDLING.pptx
 
files.pptx
files.pptxfiles.pptx
files.pptx
 
FILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUS
FILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUSFILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUS
FILE HANDLING IN C++. +2 COMPUTER SCIENCE CBSE AND STATE SYLLABUS
 
FILE HANDLING in python to understand basic operations.
FILE HANDLING in python to understand basic operations.FILE HANDLING in python to understand basic operations.
FILE HANDLING in python to understand basic operations.
 
15. Streams Files and Directories
15. Streams Files and Directories 15. Streams Files and Directories
15. Streams Files and Directories
 
pspp-rsk.pptx
pspp-rsk.pptxpspp-rsk.pptx
pspp-rsk.pptx
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
 
CHAPTER 2 - FILE HANDLING-txtfile.pdf is here
CHAPTER 2 - FILE HANDLING-txtfile.pdf is hereCHAPTER 2 - FILE HANDLING-txtfile.pdf is here
CHAPTER 2 - FILE HANDLING-txtfile.pdf is here
 
Files in Python.pptx
Files in Python.pptxFiles in Python.pptx
Files in Python.pptx
 
Files in Python.pptx
Files in Python.pptxFiles in Python.pptx
Files in Python.pptx
 
Data file handling in c++
Data file handling in c++Data file handling in c++
Data file handling in c++
 
Java Input Output and File Handling
Java Input Output and File HandlingJava Input Output and File Handling
Java Input Output and File Handling
 
File handling3 (1).pdf uhgipughserigrfiogrehpiuhnfi;reuge
File handling3 (1).pdf uhgipughserigrfiogrehpiuhnfi;reugeFile handling3 (1).pdf uhgipughserigrfiogrehpiuhnfi;reuge
File handling3 (1).pdf uhgipughserigrfiogrehpiuhnfi;reuge
 

Recently uploaded

Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTopCSSGallery
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseWSO2
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceIES VE
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governanceWSO2
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 

Recently uploaded (20)

Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

10 Python file.pptx