Тёмный

READING & WRITING DATA INTO FILES - PYTHON PROGRAMMING 

Sundeep Saradhi Kanthety
Подписаться 621 тыс.
Просмотров 89 тыс.
50% 1

1) read( )
2) readline( )
3) readlines( )
4) write( )
5) writelines ( )

Опубликовано:

 

30 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 87   
@ShivaKumar-ud8pt
@ShivaKumar-ud8pt 5 лет назад
Great Sir, continue teaching it helps thousands of students!
@rajbir_singh0517
@rajbir_singh0517 2 года назад
Sir, your teaching is really awesome, you are real teacher who understand how to make things easy and deliver to student. I have seen multiple videos about sys.args but they were not explaining as you did. Thank you sir
@harshkumarmishra1479
@harshkumarmishra1479 4 года назад
Your handwriting is clear which helps to understand the syntax of the program easily.
@Yash-gj2xy
@Yash-gj2xy 5 лет назад
Really thank you sir for ur wonderful programming videos!
@targetmission8234
@targetmission8234 5 лет назад
thank you! You're an excellent teacher. keep it up
@vikashgola287
@vikashgola287 5 лет назад
great sir,your explanations are really good.
@stephyn.s2175
@stephyn.s2175 3 года назад
Thank you sir.... very helpful part 👍👍👍👍🙏🙏🙏
@rakeshkumaryadav1117
@rakeshkumaryadav1117 2 года назад
Wonderful, just ignore all other channels and see this channel you will never confused
@user-jd2qz6xu4q
@user-jd2qz6xu4q 11 месяцев назад
Super sir nice explanation 👍👍
@EgyptofranceSAE
@EgyptofranceSAE 4 года назад
you are amazing , i loved indians because of you
@westfield90
@westfield90 5 лет назад
Do you need to specify a new line character when writing to a file ?
@tholuchurinaveen1090
@tholuchurinaveen1090 4 года назад
Great!! Keep going on sir
@venkatsai603
@venkatsai603 5 лет назад
sir please make on oops concepts also in python and mdules also
@xavierarulraj1781
@xavierarulraj1781 3 года назад
Super sir easily understood I am a begginer
@jojven7514
@jojven7514 2 года назад
thank you sir for making this masterpiece.
@thatikondakrishnachaitanya1
Nice explanation sir I am understand everything
@vastuhumara6099
@vastuhumara6099 4 года назад
Awesome video thanks a lot
@TDNoteBook
@TDNoteBook 2 года назад
Thank you very much sir to best way to explain.
@syabongajele6431
@syabongajele6431 3 года назад
thank you Sir for teaching me to create a FILE .
@sanjeebnayak9917
@sanjeebnayak9917 6 месяцев назад
so nice explanation sir.....
@414theConstant
@414theConstant Год назад
thank you sir, you helped me finding a very big mistake .
@josemaroatanha8140
@josemaroatanha8140 3 года назад
very good, thanks a lot sir.
@jhansinalla5561
@jhansinalla5561 3 года назад
Super explanation sir
@westfield90
@westfield90 5 лет назад
Best teacher
@nitinsharma9307
@nitinsharma9307 2 года назад
Really thankful sir ..
@anishatadkod1778
@anishatadkod1778 Год назад
You are so awesome sir ! Thank you 😊
@shreyaansjain.181
@shreyaansjain.181 2 года назад
excellent teaching
@bathalamallikarjuna2316
@bathalamallikarjuna2316 2 года назад
🥳🥳🥳 superb
@walieojwallah6562
@walieojwallah6562 Год назад
Thank you sir. This is understandable
@iamsilly8714
@iamsilly8714 5 лет назад
Please complete 12th class python asap sir. I think it will help many students.
@the.renish.salakhana
@the.renish.salakhana 2 года назад
Great Sir , but there are others operations like Truncating , Renaming , Removing a files are missing that all operations has module called "OS" module we need to import
@awaadalhamad638
@awaadalhamad638 Год назад
f1.read(5) did he started counting from zero or one?
@bhuvanmanikar3231
@bhuvanmanikar3231 4 года назад
Sir very nice explanation
@038anjalidevi2
@038anjalidevi2 8 месяцев назад
For suppose I don't want to close the file but I want cursor to be changed to a particular position. How is this made possible?
@carpediemscrate1923
@carpediemscrate1923 4 года назад
Thank you sir.. need Pickle dump and load method..
@pallimohan7712
@pallimohan7712 2 года назад
Super sir
@rafimd407
@rafimd407 2 года назад
Using w+ we can open file in both write and read mode, then why to create new file pointer in read mode again?
@akashshetty674
@akashshetty674 2 года назад
U r d best
@mkrishna7711
@mkrishna7711 4 года назад
hi sir i have scenario i have csv file with data i need to separate the file first three rows related to one table and rest is related to second table how can i write the script in python could you please help on this
@pannagabm2100
@pannagabm2100 6 месяцев назад
Thank you sir.. ❤🙏
@vidyashree8913
@vidyashree8913 2 года назад
Thanks 🙏
@deepakkumaar9665
@deepakkumaar9665 4 года назад
Thanks a lot sir.
@guntadivya3505
@guntadivya3505 3 года назад
super sir.
@prasadanantha9587
@prasadanantha9587 3 года назад
Sir if in a file,one of the line has error and if we want find that line number and print on the screen how to do that task.....
@manuelvaal1257
@manuelvaal1257 2 года назад
legend this guy
@pointofview6161
@pointofview6161 Год назад
Sir can u make video on CRUD operations in file handlings
@xavierarulraj1781
@xavierarulraj1781 3 года назад
Sir can you explain the read example of summit Aurora book
@tarungarg2695
@tarungarg2695 5 лет назад
what is the difference between .read() and .readlines() ? as you mention both will read complete file.
@sumanpalisetty6096
@sumanpalisetty6096 4 года назад
both are same until you pass an argument which is essentially the number of characters. if you pass read() or readlines() both are same if you have read(5), it will read only first 5 characters of a file. for readlines() there is no argument needed as it gives you complete file
@naveenhagaragi8460
@naveenhagaragi8460 4 года назад
If there are multiple lines in a file, ex: f1=open("file1.txt","w") lines=["Welcome to ","Python Programming "] f1.write(lines) read() will return each line data as it is in the file Ex: Welcome to python Programming but readlines() will return each line as an element of list. Ex: ["Welcome to ","Python Programming "]
@naveenhagaragi8460
@naveenhagaragi8460 4 года назад
At 6:40 & 14:35, i wrote below code to write data in different lines, when i print it. it was written in a single line. i opened the file from CWD and there also its written in a single line. >>> f2=open("xyz.txt","w") >>> lines=["Hello","Welcome to","Python Programming"] >>> f2.writelines(lines) >>> f2.close() >>> f2=open("xyz.txt","r") >>> f2.readlines() and output is : ['HelloWelcome toPython Programming'] Why it is not writing data in multiple lines as i have used writelines() function.???
@naveenhagaragi8460
@naveenhagaragi8460 4 года назад
got it, i need to include either at the beginning or at the end of each element of list. >>>lines=["Hello ","Welcome to ","Python Programming "]
@yashwanths2782
@yashwanths2782 Год назад
Thank you
@JayPatel-ou2ud
@JayPatel-ou2ud 2 года назад
nice sir
@rumagoswami3272
@rumagoswami3272 5 лет назад
superb sir
@sundeepsaradhi
@sundeepsaradhi 5 лет назад
hi ruma Thanks for your support towards our channel.Share our channel with your friends and keep following our channel.
@MuraliKrishna-wn2bf
@MuraliKrishna-wn2bf 4 года назад
sir, how to write data on file while runtime...
@prabhakarasam9868
@prabhakarasam9868 3 года назад
f1=open("prabha.txt","r") f1.read(-1) It displays total data in the file sir???
@rakshadevadurg1217
@rakshadevadurg1217 3 года назад
What is use of writing & reading file?
@StemmEducation
@StemmEducation 3 года назад
Thank you Sir
@shivasmart967
@shivasmart967 Год назад
TQ sir
@rajm5349
@rajm5349 4 года назад
how to get the resume shortlisted
@manasakadapalla2
@manasakadapalla2 2 года назад
thank u soooo much sir
@lsundhar8067
@lsundhar8067 Год назад
Where we will use this file opening sir can you explain?
@mustafaquraishy2392
@mustafaquraishy2392 4 года назад
Great Video but please if any can help with this code def main(): #special formatting for the output PRE = '@' SEP = '***END*** ' toOut = input('Enter file name to output ') orderFile = open(toOut, 'w') goon = 'y' while goon == 'y': name = input('Enter the name ') orderFile.write(PRE+name+' ') #concats the PRE char to the name so we know it's a name in the output file num = 'not naut' #dummy value to start so the loop loops while num != '-1': #get sales for each person, uses -1 as a sentinel value to indicate we're done looping num = (input('Enter value or -1 to quit end for ' + name +' ')) #we don't want to write the sentinel to the file if num != '-1': orderFile.write(str(num) + ' ') orderFile.write(SEP) #after we're done with the sales for a person write the seperator to mark the end #if y we loop again for another person goon = input('Would you like to enter another person? y for yes ') main() Here is the result @Alice 19.99 13.33 123 321 ***END*** @Bobby 1 2 3 4 5 6 7 8 9 10 ***END*** @Cathy 3.33 2.22 1.11 ***END*** but how can I calculate the above each employee sales to show result like below @Alice $477.32 ***END*** @Bobby $55.00 ***END*** @Cathy $6.66 ***END***
@nageshbellala5413
@nageshbellala5413 3 года назад
can i open the already existed file?
@mujiburrahamanpm4975
@mujiburrahamanpm4975 2 года назад
Tq sir
@gantaindrasenareddy9518
@gantaindrasenareddy9518 3 года назад
What about append method in files??
@MrX-ly9vq
@MrX-ly9vq 4 года назад
Sir aap plz python cbse 12 ka new syllabus k anusar lecture banayiye
@sundeepsaradhi
@sundeepsaradhi 4 года назад
hi manish if possible send me the syllabus to either my email or whatsapp email : askme.selflearning@gmail.com whatsApp : 9515140494
@vishalpanday463
@vishalpanday463 4 года назад
Sir how to store text in fill
@kdurga3235
@kdurga3235 Год назад
After print(f.read()) f.close() vundadha sir
@akshadamirashi7056
@akshadamirashi7056 3 года назад
Hi sir I have one doubt that If I am writing some data to file and want to read that data again How can I achieve this? As its write and read operation on same file and pointer shifting for each write operation.
@singaiahs796
@singaiahs796 3 года назад
f1=open("abc.txt" , "w") f1.write("hello how are you") f1.close( ) f1=open("abc.txt" , "r") print(f1.read( )) f1.close( )
@phanindraguntupalli5909
@phanindraguntupalli5909 2 года назад
Sir what about character
@sethulakshmy8838
@sethulakshmy8838 4 года назад
How to load .dat file in python?
@AparnaChoudary
@AparnaChoudary 2 года назад
sir is this log files or not
@gideonejiogu9504
@gideonejiogu9504 4 года назад
Nice class tnx, but I thought by "open" we mean to open an existing document in the computer
@sandraraynil
@sandraraynil 4 года назад
It's like opening a Bank Account. You don't have any existing account in a bank, but you open "a new one".
@durveshmahajan8097
@durveshmahajan8097 4 года назад
Sir But What is ROOT FOLDER. PLZZ 🙏 HELP
@manojb2984
@manojb2984 9 месяцев назад
Sir get and set default concept
@vinayjaiswal887
@vinayjaiswal887 3 года назад
sir if you teach with the help of python IDE then it will be more helpfull
@gantaindrasenareddy9518
@gantaindrasenareddy9518 3 года назад
And you forgot to close the file in last program sir??
@576kavitha2
@576kavitha2 3 года назад
Sir please tell me in the Telugu
@vishalpanday463
@vishalpanday463 4 года назад
Sir improve you video quality
@satishmandadi5970
@satishmandadi5970 4 года назад
Super sir
Далее
IMPLEMENTATION OF FILES - PYTHON PROGRAMMING
11:38
Просмотров 32 тыс.
FILES (OPEN,CLOSE,ACCESS MODES) - PYTHON PROGRAMMING
22:59
ШАР СКВОЗЬ БУТЫЛКУ (СКЕРЕТ)
00:46
Dictionary in Python
12:24
Просмотров 1,3 млн
CLASSES & OBJECTS - PYTHON PROGRAMMING
25:23
Просмотров 176 тыс.
Learn Python Programming - Python Course
1:48:05
Просмотров 969 тыс.