Lecture 7 : File Input/Output in Python

  Рет қаралды 457,093

Shradha Khapra

Shradha Khapra

Күн бұрын

Пікірлер: 432
@gchethan9472
@gchethan9472 2 ай бұрын
Hello all This one the best python basic lecture you will ever get, In the entire video she never asked for subscribe or like. Let’s encourage her to do more courses like this and help crores of students and learner’s. Keep up the good work Shraddha and keep on helping people.
@naniyadavlucky4960
@naniyadavlucky4960 6 күн бұрын
what do you think after completing this lectures what should we do , is there any other videos to practice them and become pro in this .
@dimeglioyt6596
@dimeglioyt6596 4 күн бұрын
There's nothing wrong to ask from the viewers to subscribe to their channel as it can be someone's main source of income and without being so mean we can listen and do that thing so
@abdullahbut15
@abdullahbut15 3 ай бұрын
Mam! this line is very motivational for me that you mentioned in start that "All power is within you you can do anything and everything"
@Anonymous-Guy-01
@Anonymous-Guy-01 10 ай бұрын
Shradha di please cover all the Topics from 0 to 100 and please start DSA with Python 🙏
@neonblade209
@neonblade209 7 ай бұрын
better to start DSA with Java or c++, becoz u will get more resources in java and c++ , dont start DSA with python
@KumarHarsh-qu3fk
@KumarHarsh-qu3fk 7 ай бұрын
@@neonblade209 AI and machine learning is better un python i guess
@kapilprajapat-qb6cz
@kapilprajapat-qb6cz 7 ай бұрын
@@KumarHarsh-qu3fk you're right
@CraftAndCodee
@CraftAndCodee 6 ай бұрын
@@neonblade209 I want to learn machine learning thats why I chose python so there is any way you can tell where I can learn DSA because leetcode and all other platforms doesnt start from basic It would be great help if you help me with this
@UnboxedGoodies
@UnboxedGoodies 6 ай бұрын
@@CraftAndCodee search for codebasics DSA playlist
@sukhvindersingh2249
@sukhvindersingh2249 6 ай бұрын
00:01 Today we will cover Chapter Seven about file operations. 02:07 RAM is volatile memory and not suitable for permanent storage 06:02 Using physical files in day-to-day operations 08:25 Opening a file in read mode returns a text IO wrapper 13:18 Understanding file reading modes 15:23 Reading a file and printing its contents 19:13 Appending data to a file in A mode 21:17 Differences between different modes 25:09 Different file modes in Python: Read Plus, Write Plus, Append Plus 27:19 Using the 'with' syntax in Python automatically closes the file 31:48 We can delete any file by using the remove function in the os module. 34:24 Replace Java with Python in a file using the replace method. 38:59 Write a function to find the line number of the word 'learning' in a file. 41:02 The code checks if a word exists within a given data string and prints the line number if it does. 45:28 Extract individual numbers from a string and convert them to integers 47:20 The code splits a string of numbers separated by commas and prints them individually. Crafted by Merlin AI.
@bhomitdixit3634
@bhomitdixit3634 8 күн бұрын
thanks bhai
@KanzaIltaf
@KanzaIltaf 3 ай бұрын
The r+ does not always add the data at the beginning. its totally depends where the cursor is like if we use the read command and then write so in this case after reading data the cursor will be in the end and if then we use the write command then the new data will be added to the end of file: For example in this case: f = open("test.txt" , "r+") content = f.read() f.write("john" ) f.close() : now in this case "john" will be added to the end of file. so remember the cursor is not always in the beginning in r+ mode its totally depends what you have done before that line of code. Happy coding😊
@codewithme1042
@codewithme1042 10 ай бұрын
please create a series for AI, ML && Neutral Networks and cover all the topics.
@ShadowCipher
@ShadowCipher 10 ай бұрын
Ys ma'am please 🥺
@ShadowCipher
@ShadowCipher 10 ай бұрын
Ys ma'am please 🥺
@premrawtani4307
@premrawtani4307 4 ай бұрын
yes ma'am please create the playlist for ai ,ml and neural network
@Factsmotivation-as
@Factsmotivation-as 3 ай бұрын
Yes ma'am
@TheAnimeman8105
@TheAnimeman8105 2 ай бұрын
comment on apnacollege for this letest video
@sandeshgawali8056
@sandeshgawali8056 Ай бұрын
for those who not getting that where to write pip install command please write that command in your terminal 31:49 and all set
@Yug-s7h
@Yug-s7h 28 күн бұрын
I am facing the issue in starting, demo.txt file does not print , only print the type demo.txt, could you please tell me how to fix this problem?
@akhileshghatate4157
@akhileshghatate4157 5 ай бұрын
36:42 def replace(old_string, new_string): with open("practice2.txt","r") as f: data=f.read() n_data = data.replace(old_string, new_string) print(n_data) with open("practice2.txt","w") as f: f.write(n_data) replace("Java","Python")
@MKJmahi7876
@MKJmahi7876 3 ай бұрын
def replace("Java" , "python"): with open ("practice2.txt", "r" ) as f : date= f.read() n_data= data.replace("Java" , "python" ) print(n_data) with open("practice2.txt", "w"): f.write(n_data)
@omkarthakur8358
@omkarthakur8358 Ай бұрын
The example of Shaktimaan was the best example 👌.
@anuragrahangdale23471
@anuragrahangdale23471 9 ай бұрын
this series is most helpful for me ..thanks to shradhaa mam
@yhsunny9384
@yhsunny9384 10 күн бұрын
One thing to mention, that the 'in' operator in Python checks for a substring match, meaning it will return True even if only part of the word "learning" appears in the text. For example, if the text contains "lear" or any character that the word starts with, the code will still print the word is "found". At 41:37.
@Successthoughts01
@Successthoughts01 10 ай бұрын
Thanks didi from bottom of my heart for this awasome python series.
@__pg.editzz
@__pg.editzz 7 ай бұрын
0:13
@SomayOjha
@SomayOjha Ай бұрын
I wanted to point out that while the code used to import data from another file and count all the even numbers (without using the split function) was functioning, there is a serious bug. The issue is that you will never get the ending value because there is no comma to separate it. This can be fixed with a little tweak, but I thought it's good if I let everyone know.
@SamMentors
@SamMentors 8 ай бұрын
It's really helping for students. The way you are providing knowledge in an easy and simple way.
@krishnanandtiwari732
@krishnanandtiwari732 8 ай бұрын
Mujhe kafi mn tha, python sikhne ka , ye bahut hi unique vedio hai Mam
@azhar-073
@azhar-073 20 күн бұрын
very intellgently teaching python. I really admire her, as I have seen one of other tutorial but that was insufficient and incomplete. Nice
@manavsojitra8508
@manavsojitra8508 9 ай бұрын
36:59 with open("kt.txt","r") as k: data = k.read() if "learning" in data: print("found") else: print("not found")
@bhriguraj1151
@bhriguraj1151 14 күн бұрын
28:21 shaktimaan & gangadhar
@Lavanya-b2m
@Lavanya-b2m 4 ай бұрын
10:24 mam string is not printing only the type is printing
@RahulSingh-ml9hg
@RahulSingh-ml9hg 3 ай бұрын
same problem with me
@BowlNest
@BowlNest 3 ай бұрын
same problem with me
@valltakegaming6854
@valltakegaming6854 3 ай бұрын
bhai log minimize kar ke karne ke bad ho raha hai with every change in demo.txt i ahve to Minimize VSC
@valltakegaming6854
@valltakegaming6854 3 ай бұрын
@@BowlNest bhai log minimize kar ke karne ke bad ho raha hai with every change in demo.txt i ahve to Minimize VSC
@valltakegaming6854
@valltakegaming6854 3 ай бұрын
@@RahulSingh-ml9hg bhai log minimize kar ke karne ke bad ho raha hai with every change in demo.txt i ahve to Minimize VSC
@architrajthonghar7982
@architrajthonghar7982 2 ай бұрын
Understood everything but at 48:20 the last number in the data isn't printed as there was no "," after the no. 101
@bikashpandey4051
@bikashpandey4051 Ай бұрын
Thanks a lot maam for teaching us simply and clearly, in an understandable way. Hare krishna !
@divyanshisaluja3133
@divyanshisaluja3133 5 ай бұрын
Ma'am, The vs code is showing empty lines in output even when using the read() function for the first time. what's the reason for this?
@educentre6822
@educentre6822 3 ай бұрын
bro save your previous txt file, then it will show output.
@RajzMANISH
@RajzMANISH 10 ай бұрын
I'm waiting = 8th video 🧑‍💻🧑‍💻
@BizAutomate
@BizAutomate 10 ай бұрын
I'm waiting = 8th video🧑‍💻🧑‍💻 ^ SyntaxError: unterminated string literal (detected at line 1)
@mohiteshanshu2555
@mohiteshanshu2555 9 ай бұрын
​@@BizAutomate😂
@Belovedme-1
@Belovedme-1 4 ай бұрын
😂​@@BizAutomate
@paramjjethwa8734
@paramjjethwa8734 Ай бұрын
thank you amazing lecture yet again, last part practice question was amazing cleared all my doubt but need to practice more
@Rajput1678
@Rajput1678 10 ай бұрын
Ma'am please cover projects in this python series as you did in JS series please ❤❤❤
@rangasainath
@rangasainath 10 ай бұрын
Ha ...
@kuldeepsikarwar6613
@kuldeepsikarwar6613 10 ай бұрын
Ek projects ke sath me use kishe karna hai ye bhi Sikh lenge
@kuldeepsikarwar6613
@kuldeepsikarwar6613 10 ай бұрын
To ek projects to karna padega
@ccydzggzh
@ccydzggzh 6 ай бұрын
some pls help me when i write replace at 36:20 it is showing new_data = data.replace("Java", "Python") ^^^^^^^^^^^^ AttributeError: 'builtin_function_or_method' object has no attribute 'replace' pls help me
@anime-beat
@anime-beat 12 сағат бұрын
code for the problem to find learning in line with line index of a file 'with open('practice.txt', 'r') as file: n = 0 for line in file: n += 1 if 'learning' in line.strip(): print('learning found in line', n) else: continue'
@AJosl360
@AJosl360 2 ай бұрын
key topics with timestamp :------> 00:01 Today we will cover Chapter Seven about file operations. 02:07 RAM is volatile memory and not suitable for permanent storage 06:02 Using physical files in day-to-day operations 08:25 Opening a file in read mode returns a text IO wrapper 13:18 Understanding file reading modes 15:23 Reading a file and printing its contents 19:13 Appending data to a file in A mode 21:17 Differences between different modes 25:09 Different file modes in Python: Read Plus, Write Plus, Append Plus 27:19 Using the 'with' syntax in Python automatically closes the file 31:48 We can delete any file by using the remove function in the os module. 34:24 Replace Java with Python in a file using the replace method. 38:59 Write a function to find the line number of the word 'learning' in a file. 41:02 The code checks if a word exists within a given data string and prints the line number if it does. 45:28 Extract individual numbers from a string and convert them to integers 47:20 The code splits a string of numbers separated by commas and prints them individually. thankyou
@md.shuheburrahman4002
@md.shuheburrahman4002 5 ай бұрын
I LIKE your confidence mam/didi. You are doing too good.
@the.ShubhamRaj
@the.ShubhamRaj 5 ай бұрын
10:24 me jab ye code likh k run krr rha hu tbb bss class 'str' likh k aa rha h baaki demo.txt pe jo maine likha h vo aa hi nhi rha .... can anyone help me out??/
@bhaithakur9120
@bhaithakur9120 5 ай бұрын
Type likh kar chala Bhai Thakur_sahab 03_9 per photo send kar
@Yug-s7h
@Yug-s7h 28 күн бұрын
I am facing the same issue, if your problem has been solved. please tell me
@AkankshaRai-p6y
@AkankshaRai-p6y 4 ай бұрын
Hi mam kitna aachha pdhati hai aap thank you so much
@HamzaAli-vs9tb
@HamzaAli-vs9tb Ай бұрын
There is one thing Maan Shradha forgets to mention is that if anyone passes the path of a text file to the first parameter of the open function, so if you just copy and paste the path as it is in the double quotes, Python will give an error because in the path there are back slashes (\), and python treated back slashes as an escape sequence character. So to fix this, there are many options, but I find these two easy; either u can put r before the first double quote and so python will treat the path as a raw string or u can replace all single back slashes with double back slashes(\\) and so python will treat this as a normal back slash rather then treating it as a escape sequence character.
@irfatali4477
@irfatali4477 10 ай бұрын
I am from Pakistan and i am learning frontend development by watching your tutorial. you are doing absolutely great work. html css js ho gae ab react.js ka course kab aey ga
@rewatiraman2956
@rewatiraman2956 10 ай бұрын
congrats
@Atch.19
@Atch.19 3 күн бұрын
Ak sawal ha ap sa d chowk per goli kyooo cahlai
@S.creator9913
@S.creator9913 5 ай бұрын
Construct a program which accepts a sequence of words separated by whitespace as file input. Print the words composed of digits only.
@S.creator9913
@S.creator9913 5 ай бұрын
@shradhaKD mam please
@CodeSeriesWithRudra
@CodeSeriesWithRudra 10 ай бұрын
I am the 1st viewer of this video
@GAMIDATA
@GAMIDATA 5 ай бұрын
Ma'am if I run the "write command in VScode " it is not working. What should I do? Pls help... when I run the write command the text in the txt file is not overwriting as you said.... the text remains the same. Pls help..... 🙏🏽🙏🏽
@namratamankar9138
@namratamankar9138 6 ай бұрын
mam , while replacing the word java to python , and after that the file should be overwritten, but when i was writing the code the file is not being overwritten but the new file is being created , which should not happen right?how should i come over this error.
@harshiljana3701
@harshiljana3701 3 ай бұрын
I didn't understand 38:00 where she writes "!= -1". Can someone explain.
@mahesha1770
@mahesha1770 2 ай бұрын
same, whats that -1
@ApurvaChandanshive
@ApurvaChandanshive 3 ай бұрын
Thank you so much didi. ❤
@tecproudtuber2399
@tecproudtuber2399 Ай бұрын
This series is one of the best series for learning python, easy learning with didi but apne Gangadhar ko Vidyadhar bna Diya lol :)
@ABHISHEKSAINI-x7c
@ABHISHEKSAINI-x7c Ай бұрын
😄
@akhileshghatate4157
@akhileshghatate4157 5 ай бұрын
37:07 WAF to find all the occurrences of any given word. def check_for_word(word): line_no=1 occurrence=[] with open("practice.txt","r") as f: for line in f: if word in line: occurrence.append(line_no) line_no+=1 if occurrence: print(f"the word {word} was found at lines:, {occurrence}") else: print(f"the word {word} was not found in the file") check_for_word("Python")
@CodersTrios3956
@CodersTrios3956 2 ай бұрын
awesome lecture didi 🙌
@NishantKumar_N
@NishantKumar_N 10 ай бұрын
32:57 Practice Question 1 ---------> with open("practice.txt", "w") as f: f.writelines("Hi everyone, We are learning File I/O using Java. I like programming in Java.")
@akhileshghatate4157
@akhileshghatate4157 5 ай бұрын
48:38 why didn't 101 print in the terminal and how to get it??
@neededucation
@neededucation 10 ай бұрын
Mam mere pass to yeh ha he nhe mtlb jab main aap wala code chala raha hun thonny pe to woh error generate kar raha ha yeh kiyu mane demo.txt he likha tha
@miss_joker
@miss_joker 8 ай бұрын
same
@DhritiYadav-iy4cv
@DhritiYadav-iy4cv 2 ай бұрын
We love your classes, Please make video lecture on pygame development 😢 Its our request Vote for lectures on pygame 👇
@nitintripathi1779
@nitintripathi1779 2 ай бұрын
MAM 28:21 *Gangadhar
@TUFFANGAMING15
@TUFFANGAMING15 7 ай бұрын
Hey can anyone tell me why my data is not able to print in new file..Plzzzz
@prabhatchhatui3992
@prabhatchhatui3992 9 ай бұрын
দিদি C++ এর একটা সিরিজ বানান। আপনার সমস্ত ভিডিও গুলি খুবই সাহায্যকারী হয়। 😊😊😊
@NitinSharma-np6tm
@NitinSharma-np6tm 2 ай бұрын
Shaktiman is gangadhar not vidhyadhar ma'am😂 @28:20
@ADITYAJHA-k8l
@ADITYAJHA-k8l 3 ай бұрын
madam in practicle question 1 instead of using can we use multiline string quotes(tripple quotes ) as it is provinding the same output
@bhavyajeetsinghdevda9651
@bhavyajeetsinghdevda9651 4 ай бұрын
even though i created demo file in same folder still i am getting error 'demo.txt' file is not created i am using vs code can anyone help please and if i am giving full path then the error comes is SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape please help if any one know the reason
@learnwithnagma
@learnwithnagma 10 ай бұрын
Thank you so much didi for your efforts 👍. Literally enjoy studying coding via you & inspired by ur efforts 😊.
@dailyuploads3959
@dailyuploads3959 4 ай бұрын
write a program to convert the sequence of number into type of integer ----------- with open('read_num.txt', 'r') as f: read_file = f.readline() split_stream = read_file.split(",") int_converted_val = [] for num in split_stream: number = int(num) int_converted_val.append(number) print(int_converted_val)
@kritikapandit3279
@kritikapandit3279 4 ай бұрын
For me this class is not running on VS code, but working on Jupyter. why is it so.
@TheAmanLifts
@TheAmanLifts 9 ай бұрын
Thankyou ma'am for the lecture ! We will be really grateful if you teach us DSA USING PYTHON ! 🙏
@AnoopKumar-qj9tt
@AnoopKumar-qj9tt 5 ай бұрын
If we go with the traditional method, what if the last no after comma is even no. In that case last no will not come in num bcoz there is no comma after that & we can't check even for it Ps: last ques of the video
@NishantKumar_N
@NishantKumar_N 10 ай бұрын
38:07 Practice Question 3 me != -1 ye samajh me nahi aaya, please koi explain karo 🙏🏾🙏🏾🙏🏾
@61mahesh16
@61mahesh16 9 ай бұрын
Mujhey bhi bhai
@61mahesh16
@61mahesh16 9 ай бұрын
Mujhey question no4 bhi nahi samjh aa raha hai if you please explain
@trishakarmakar4605
@trishakarmakar4605 5 ай бұрын
it will be great for students if you start DSA with Python...
@jalaramstudio
@jalaramstudio 10 ай бұрын
Please made playlist of advance java concepts
@SKSAIFIBNAEZHARARKO
@SKSAIFIBNAEZHARARKO 3 ай бұрын
Practice question- 32:55
@CodeClips-CC
@CodeClips-CC 2 ай бұрын
what to do if i have to read only second line of the file and not first one?
@asimaqadri7226
@asimaqadri7226 Ай бұрын
M i the only 1 whoes first code is not working. I made a file naming demo.txt Then write f=open ("demo.txt") data=f.read () Print(data) Print(type(data)) But in terminal it prints only type which is str but no data
@Yug-s7h
@Yug-s7h 28 күн бұрын
I am facing same issues, Have you solved this problem, please tell me how to fix it?
@md.sabbirmahmud7388
@md.sabbirmahmud7388 16 күн бұрын
I am also facing same type issue. Have you findout any solution?​@@Yug-s7h
@gtachannelloveronly
@gtachannelloveronly 10 ай бұрын
Loving your content mam, I've been learning from you for so long and you make it very easy to grab a good hold on the concept, please if possible, extend this series by adding data analysis videos using numpy pandas, I'm a data enthusiast and building a career in data field. It'll be really helpful if you can add these concepts as well, and as you said you also wish to give a tutorial on machine learning, I will definitely wait for your ML videos.
@educentre6822
@educentre6822 3 ай бұрын
my statement automatically showed up on next line, without mentioning " ", reason?? (19:55)
@devanshsingh7097
@devanshsingh7097 5 ай бұрын
10:26 f = open("demo.txt","r") ^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'demo.txt' plz help me
@SwarnavoNathD4
@SwarnavoNathD4 6 ай бұрын
when am running the program in VS code the sentence is not getting printed IDK why?? But the code is correct there is no error. Any solution???? nither any file is getting created with OPEN SYNTAX!!!!!!!!!!!!!!
@bipinkuruvilla9915
@bipinkuruvilla9915 6 ай бұрын
same bro file is not getting created i also dk why?
@Ashwathama814
@Ashwathama814 5 ай бұрын
Txt wali file pe ctrl+s karke save karo phir ho jayega aap bina save kare hi kar rahe hoge
@SwarnavoNathD4
@SwarnavoNathD4 5 ай бұрын
@@Ashwathama814 ok will try THNX
@AnimewithAman
@AnimewithAman 7 ай бұрын
Thank you so much for the awesome videos your knowledge definitely help to clear the problems 😊😊
@ramyarathimaheshwari9149
@ramyarathimaheshwari9149 13 күн бұрын
Read ho rhya he jese hi write vale part me jati hu to errno 9 bad file descriptor show ho rha he... Esa kyu ho rha he???
@S.K.0001
@S.K.0001 10 ай бұрын
What dep. of the sector should anyone go if they had two year gap after btech with no experience,plz give some suggestions for it as u know not everyone gets jobs in college.and should they prepare for cloud,or full stack or data analytics what to do Plz guide...or where will be the vaccancy for them as most of the company don't consider them at all...
@GAMIDATA
@GAMIDATA 5 ай бұрын
Ma'am if I run the "append command in VScode " it is not working. What should I do? pls help..... when I run the append command the text in the txt file is not adding in the end as you said.... the text remains the same. But it is running in jupyter notebook
@ArpitSarang-sw1et
@ArpitSarang-sw1et 4 ай бұрын
use write
@harneetgrewal9475
@harneetgrewal9475 Күн бұрын
Where is article link provided? Can u pl share
@srusthidevaray
@srusthidevaray 3 күн бұрын
mam i dont understand in i/o module why you take find word !=-1
@musicscanner6465
@musicscanner6465 8 ай бұрын
kya shaktiman hi vidhyadhar hai? or vidhyadhar hi shaktiman hai to gangadhar kaun hai?(28:20)
@Asadneon
@Asadneon 8 ай бұрын
focus on programing
@omshubhgupta277
@omshubhgupta277 7 ай бұрын
why you don 't made video on exceptional handling, NumPy and the other topic
@mkapadia99
@mkapadia99 5 күн бұрын
Nice video!
@Shehzadhacker
@Shehzadhacker 10 ай бұрын
What is file text bold,underlines
@dailyuploads3959
@dailyuploads3959 4 ай бұрын
WAP to find the word which we find the I/O streamed file ------------------- def fun(): with open('read_file.txt',"r") as f: word = 'dogs' data = True line = 1 while data: data = f.readline() if(word in data): print(line) return line += 1 fun()
@naveenchandra1298
@naveenchandra1298 5 ай бұрын
But Mam in my laptop the file is open automatically but the new file is not open as in your computer show please help to avoid this.
@maniverma8867
@maniverma8867 10 ай бұрын
First 🥇 like and comment and viewer
@ProductHS
@ProductHS 10 ай бұрын
I do add path but in CMD not recognized python version tell me some trick to start journey to python course
@kisanmanila9317
@kisanmanila9317 6 ай бұрын
Hi Shradha, Can you take some more session this OS related command , As I have to do some monitoring automation in my servers. But not getting proper source of this? Al least can you please provide the source of above OS command ?
@innayatsingh9483
@innayatsingh9483 6 ай бұрын
Ma'am meri file open nhi ho rhi h. Code bhi sahi h. 10 baar check kiya h. Kya problem ho skta h
@gauravsharma76975
@gauravsharma76975 6 ай бұрын
Brother dhyaan se dkhna file ki directory kaha h and file ki check krna kaha h fir shi hojayega. for example maine jo txt banaya vo python>lecture>txt wale folder me banaya but python use python foldeer me search kr rha h so dhyaan se dkhna
@Ashwathama814
@Ashwathama814 5 ай бұрын
Txt wali file pe ctrl+s karke usse save karo phir ho jayega
@ramyarathimaheshwari9149
@ramyarathimaheshwari9149 13 күн бұрын
Facing same issue
@dhanapatilongjam1749
@dhanapatilongjam1749 12 күн бұрын
Sis make more video such as numpy full course, ai, ml, deep learning❤❤
@anuragmaurya2796
@anuragmaurya2796 9 ай бұрын
Didi Exception handling in python !! par bhi video banayiye please 🙏❤❤❤❤
@thegodevil3703
@thegodevil3703 2 ай бұрын
def check_for_line (n): line_no = 1 with open("practice.txt", "r") as f: for line in f: if line.find (n) != -1: print (line_no) return line_no += 1 return ("not found") print(check_for_line("hi"))
@kdpr007
@kdpr007 6 ай бұрын
Q1) is there a solution to avoid print one blank line after reading any one line at a time due to impact of implicit ' ' at the end of the string in line1?
@physicstomystry
@physicstomystry 10 ай бұрын
Mam is this also helpful for btech 2nd year Aktu syllabus is this complete and enough to get master upon pythons plz response mam .
@PDPH742
@PDPH742 8 ай бұрын
Thank you for this lecture ❤ I very happy to learning at 9th 😊😊🎉
@ImRich-xo8cm
@ImRich-xo8cm 8 ай бұрын
def search(): with open('practice.txt','r') as f: line1=f.readline() line2=f.readline() line3=f.readline() line4=f.readline() if 'learning' in line1 or line2 or line3 or line4: print('found') else: print('1') search()
@socialsz5864
@socialsz5864 7 ай бұрын
tumne yeto print nhi kerwaya ke kis line mai found hoa ?
@Mikey-sc1rs
@Mikey-sc1rs 10 ай бұрын
Had a little difficulty in understanding recursion previous lecture any tips?
@rewatiraman2956
@rewatiraman2956 10 ай бұрын
do sirshasan yoga , you will understand, recursion is like a sirshasana.
@Gamer_Harsh7572
@Gamer_Harsh7572 8 ай бұрын
same man i also face difficulty learning it still i don't undestand it any tips
@aleezasoomro6155
@aleezasoomro6155 3 ай бұрын
Ma’am, plz make a playlist for NLP! No credible information for NLP and computational linguistics.
@HarshSwaroop-u3t
@HarshSwaroop-u3t 4 ай бұрын
Thanks you shhh❤ radha ❤
@bibekyadav9675
@bibekyadav9675 3 ай бұрын
f= open("demo.txt","r") text = f.read() line1 = f.readline() print(line1) print(text) print(type(text)) f.close print(text) & print(line1) kiyu output nahi de raha hai mujhme,,, 2 line blank hoke sidha type(text) print ho raha hai
@thekveer
@thekveer 6 ай бұрын
hell dii in my window 10 i am not able to run this code.. i tried several time but its not working so plz help me to resolve this problem
@Ashwathama814
@Ashwathama814 5 ай бұрын
Kya problem aa rahi hai?
@thekveer
@thekveer 5 ай бұрын
@@Ashwathama814 code run hi nhi ho raha
@prembainade5902
@prembainade5902 10 ай бұрын
Kab se wait kr rha tha chapter 7 ka
@VideoEditor-I
@VideoEditor-I 9 ай бұрын
di har bar as a output blank space hi arhi h. pls help🙏🙏
@kapil_Jadhav
@kapil_Jadhav 10 ай бұрын
I'm in 11th is there any option to make money after learning python? I really need money?
@delight5186
@delight5186 2 ай бұрын
its very help lectures
@premsharma2595
@premsharma2595 5 ай бұрын
00:01 Today we will cover Chapter Seven about file operations. 02:07 RAM is volatile memory and not suitable for permanent storage 06:02 Using physical files in day-to-day operations 08:25 Opening a file in read mode returns a text IO wrapper 13:18 Understanding file reading modes 15:23 Reading a file and printing its contents 19:13 Appending data to a file in A mode 21:17 Differences between different modes 25:09 Different file modes in Python: Read Plus, Write Plus, Append Plus 27:19 Using the 'with' syntax in Python automatically closes the file 31:48 We can delete any file by using the remove function in the os module. 34:24 Replace Java with Python in a file using the replace method. 38:59 Write a function to find the line number of the word 'learning' in a file. 41:02 The code checks if a word exists within a given data string and prints the line number if it does. 45:28 Extract individual numbers from a string and convert them to integers 47:20 The code splits a string of numbers separated by commas and prints them individually.
@MPPSCGliders
@MPPSCGliders 2 ай бұрын
kuch jyada hi free baitha h bhai tu😂😂😂
Reality of my Google Salary after TAXES
6:54
Fraz
Рет қаралды 298 М.
Smart Sigma Kid #funny #sigma
00:33
CRAZY GREAPA
Рет қаралды 39 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 10 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 114 МЛН
File IO in Python | Python Tutorial - Day #49
12:53
CodeWithHarry
Рет қаралды 302 М.
How to Score More in College Exams? 5 Mistakes to avoid
9:43
Apna College
Рет қаралды 814 М.
Python Tutorial: File Objects - Reading and Writing to Files
24:33
Corey Schafer
Рет қаралды 1,8 МЛН
FASTEST Way to Learn Coding and ACTUALLY Get a Job
6:32
Rajeev Bera
Рет қаралды 28 М.
Lecture 6 : Functions & Recursion in Python | Python Full Course
1:01:48
Shradha Khapra
Рет қаралды 678 М.
GSoC 2025 Complete Roadmap | Google Summer of Code
18:30
Apna College
Рет қаралды 334 М.
File Handling in Python | Python Tutorials for Beginners #lec95
45:32
Jenny's Lectures CS IT
Рет қаралды 112 М.
Adani | ₹2000 Crore Bribery Case EXPOSED | Dhruv Rathee
27:43
Dhruv Rathee
Рет қаралды 10 МЛН
Python Tutorial for Beginners | Learn Python in 1.5 Hours
1:17:12
Apna College
Рет қаралды 10 МЛН
Smart Sigma Kid #funny #sigma
00:33
CRAZY GREAPA
Рет қаралды 39 МЛН