#FileHandlinginPython
#WhatIsFile
#TypesOfFiles
File handling in python
what is file?
types of files?
file:
1.A collection of related infomation stored into
a particular area on the memory.
This area is called a file.
2. To store the data permanently.
python supports 2 types of files:
1. text files
2. binary files
1. text files:
to store the text information only
i.e. human understandle information.
the files extensions are:
.txt,.html,.c,.cpp,.java,.py
ex: student.txt,emp.txt,bank.txt,hospital.txt
2. binary files:
These files are used to the images, pics,
audio and vidoes information only.
i.e. this information is computer understandble,
but not the human understanble,
because this infomation stored in 0's and 1's format.
the file extension are:
.jpg,.jpeg,.mp4,.....
ex: student.jpg, emp.jpg,bank.jpt,jntu.jpg
india.jpg
file operations in python:
1. To open a file.
This operation is done by open() built-in function
2. writing the data to a file:
write()
writelines()
print()
3. reading the data from the file:
read()
read(n)
readline
readlines()
4. close the file:
close()
5. renaming the file:
rename()
6. delete the file or remove the file.
remove()
------------------------------------------------
►THANKS for taking the time to visit, I hope you SUBSCRIBE and enjoy the upcoming videos!
►Please SUBSCRIBE for More videos:
/ viadigitally
►If you like this video, Please click on Like and Comment!
►Follow Us on Social Network:
►Facebook: / viadigitally
►Twitter: / viadigitally
►LinkedIn: / viadigitally
► Instagram: / viadigitally
Python tutorial for beginners| python programming language tutorial
Python basics | python tutorial for beginners | learn python programming from scratch
Python tutorial for beginners - learn python for machine learning and web development.
Python tutorial for beginners | python programming | learn python | great learning.
Python tutorial for beginners [full course] learn python for web development.
Watch video File Handling in Python | What is File and Types of Files in Python | Learn python online online without registration, duration hours minute second in high quality. This video was added by user ViaDigitally 03 May 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 43 once and liked it 2 people.