Lecture 7 : File Input/Output in Python

Поделиться
HTML-код
  • Опубликовано: 3 янв 2025

Комментарии • 454

  • @gchethan9472
    @gchethan9472 2 месяца назад +47

    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 23 дня назад +1

      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 22 дня назад +2

      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 4 месяца назад +17

    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 11 месяцев назад +157

    Shradha di please cover all the Topics from 0 to 100 and please start DSA with Python 🙏

    • @neonblade209
      @neonblade209 8 месяцев назад +12

      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 месяцев назад +10

      @@neonblade209 AI and machine learning is better un python i guess

    • @kapilprajapat-qb6cz
      @kapilprajapat-qb6cz 7 месяцев назад +4

      @@KumarHarsh-qu3fk you're right

    • @CraftAndCodee
      @CraftAndCodee 7 месяцев назад +7

      @@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

  • @KanzaIltaf
    @KanzaIltaf 3 месяца назад +13

    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😊

  • @sukhvindersingh2249
    @sukhvindersingh2249 7 месяцев назад +14

    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.

  • @codewithme1042
    @codewithme1042 11 месяцев назад +46

    please create a series for AI, ML && Neutral Networks and cover all the topics.

    • @ShadowCipher
      @ShadowCipher 10 месяцев назад +1

      Ys ma'am please 🥺

    • @ShadowCipher
      @ShadowCipher 10 месяцев назад +1

      Ys ma'am please 🥺

    • @premrawtani4307
      @premrawtani4307 4 месяца назад

      yes ma'am please create the playlist for ai ,ml and neural network

    • @Factsmotivation-as
      @Factsmotivation-as 4 месяца назад

      Yes ma'am

    • @TheAnimeman8105
      @TheAnimeman8105 3 месяца назад

      comment on apnacollege for this letest video

  • @akhileshghatate4157
    @akhileshghatate4157 6 месяцев назад +11

    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 месяца назад +2

      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)

  • @yhsunny9384
    @yhsunny9384 27 дней назад

    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.

  • @HamzaAli-vs9tb
    @HamzaAli-vs9tb 2 месяца назад +1

    There is one thing Ma'am 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.

  • @cfaprashant45
    @cfaprashant45 2 дня назад

    So awesome nice video by you Shradha Khapra madam, Its so awesome

  • @omkarthakur8358
    @omkarthakur8358 2 месяца назад +4

    The example of Shaktimaan was the best example 👌.

  • @sandeshgawali8056
    @sandeshgawali8056 Месяц назад +3

    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 Месяц назад

      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?

  • @Successthoughts01
    @Successthoughts01 11 месяцев назад +13

    Thanks didi from bottom of my heart for this awasome python series.

  • @SamMentors
    @SamMentors 9 месяцев назад +3

    It's really helping for students. The way you are providing knowledge in an easy and simple way.

  • @anuragrahangdale23471
    @anuragrahangdale23471 10 месяцев назад +13

    this series is most helpful for me ..thanks to shradhaa mam

  • @SomayOjha
    @SomayOjha Месяц назад +3

    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.

  • @Chandu_Sai_20
    @Chandu_Sai_20 3 дня назад

    Thankyou mam for this amazing vedio , i understood everything

  • @krishnanandtiwari732
    @krishnanandtiwari732 8 месяцев назад +2

    Mujhe kafi mn tha, python sikhne ka , ye bahut hi unique vedio hai Mam

  • @zafariqbalzafariqbal2267
    @zafariqbalzafariqbal2267 3 дня назад

    Alhumdullilha 💖
    Satisfied

  • @Lavanya-b2m
    @Lavanya-b2m 5 месяцев назад +7

    10:24
    mam string is not printing only the type is printing

    • @RahulSingh-ml9hg
      @RahulSingh-ml9hg 4 месяца назад +1

      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

  • @azhar-073
    @azhar-073 Месяц назад

    very intellgently teaching python. I really admire her, as I have seen one of other tutorial but that was insufficient and incomplete. Nice

  • @bikashpandey4051
    @bikashpandey4051 Месяц назад

    Thanks a lot maam for teaching us simply and clearly, in an understandable way. Hare krishna !

  • @paramjjethwa8734
    @paramjjethwa8734 Месяц назад

    thank you amazing lecture yet again, last part practice question was amazing cleared all my doubt but need to practice more

  • @bhriguraj1151
    @bhriguraj1151 Месяц назад +3

    28:21 shaktimaan & gangadhar

  • @architrajthonghar7982
    @architrajthonghar7982 2 месяца назад +2

    Understood everything but at 48:20 the last number in the data isn't printed as there was no "," after the no. 101

  • @akhileshghatate4157
    @akhileshghatate4157 6 месяцев назад +1

    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")

  • @manavsojitra8508
    @manavsojitra8508 9 месяцев назад +1

    36:59
    with open("kt.txt","r") as k:
    data = k.read()

    if "learning" in data:
    print("found")
    else:
    print("not found")

  • @AJosl360
    @AJosl360 3 месяца назад

    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

  • @Rajput1678
    @Rajput1678 11 месяцев назад +12

    Ma'am please cover projects in this python series as you did in JS series please ❤❤❤

  • @anime-beat
    @anime-beat 18 дней назад

    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'

  • @irfatali4477
    @irfatali4477 11 месяцев назад +8

    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 11 месяцев назад +1

      congrats

    • @Atch.19
      @Atch.19 21 день назад

      Ak sawal ha ap sa d chowk per goli kyooo cahlai

  • @md.shuheburrahman4002
    @md.shuheburrahman4002 5 месяцев назад

    I LIKE your confidence mam/didi.
    You are doing too good.

  • @NishantKumar_N
    @NishantKumar_N 11 месяцев назад +1

    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.")

  • @S.creator9913
    @S.creator9913 6 месяцев назад +1

    Construct a program which accepts a sequence of words separated by whitespace as file input. Print the words composed of digits only.

  • @AkankshaRai-p6y
    @AkankshaRai-p6y 5 месяцев назад +1

    Hi mam kitna aachha pdhati hai aap thank you so much

  • @TheAmanLifts
    @TheAmanLifts 10 месяцев назад +2

    Thankyou ma'am for the lecture !
    We will be really grateful if you teach us DSA USING PYTHON !
    🙏

  • @haridwariya
    @haridwariya 6 дней назад +1

    Didi one video of python modules and libraries ke liye bi bana do please

  • @ApurvaChandanshive
    @ApurvaChandanshive 3 месяца назад +1

    Thank you so much didi. ❤

  • @CodersTrios3956
    @CodersTrios3956 2 месяца назад

    awesome lecture didi 🙌

  • @jalaramstudio
    @jalaramstudio 11 месяцев назад +2

    Please made playlist of advance java concepts

  • @trishakarmakar4605
    @trishakarmakar4605 6 месяцев назад +1

    it will be great for students if you start DSA with Python...

  • @divyanshisaluja3133
    @divyanshisaluja3133 6 месяцев назад +8

    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 4 месяца назад +2

      bro save your previous txt file, then it will show output.

  • @prabhatchhatui3992
    @prabhatchhatui3992 9 месяцев назад

    দিদি C++ এর একটা সিরিজ বানান।
    আপনার সমস্ত ভিডিও গুলি খুবই সাহায্যকারী হয়। 😊😊😊

  • @CodeSeriesWithRudra
    @CodeSeriesWithRudra 11 месяцев назад +3

    I am the 1st viewer of this video

  • @AnimewithAman
    @AnimewithAman 7 месяцев назад

    Thank you so much for the awesome videos your knowledge definitely help to clear the problems 😊😊

  • @learnwithnagma
    @learnwithnagma 11 месяцев назад +3

    Thank you so much didi for your efforts 👍.
    Literally enjoy studying coding via you & inspired by ur efforts 😊.

  • @gtachannelloveronly
    @gtachannelloveronly 11 месяцев назад +3

    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.

  • @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)

  • @prembainade5902
    @prembainade5902 11 месяцев назад +2

    Kab se wait kr rha tha chapter 7 ka

  • @Hindi_moral_stories_1M
    @Hindi_moral_stories_1M 2 дня назад +1

    when i run the program the terminal shows blank space , not the contain of the data of the file.

  • @lokeshkumarmechanicalking
    @lokeshkumarmechanicalking 4 дня назад

    Thank you ❤❤❤ di

  • @tecproudtuber2399
    @tecproudtuber2399 2 месяца назад

    This series is one of the best series for learning python, easy learning with didi but apne Gangadhar ko Vidyadhar bna Diya lol :)

  • @ADITYAJHA-k8l
    @ADITYAJHA-k8l 4 месяца назад

    madam in practicle question 1 instead of using
    can we use multiline string quotes(tripple quotes ) as it is provinding the same output

  • @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

  • @MuhammadTayyab-o3c
    @MuhammadTayyab-o3c 11 месяцев назад

    Shradha mam please make a one shot on REACT JS.

  • @akhileshghatate4157
    @akhileshghatate4157 6 месяцев назад

    48:38
    why didn't 101 print in the terminal and how to get it??

  • @dhanapatilongjam1749
    @dhanapatilongjam1749 29 дней назад

    Sis make more video such as numpy full course, ai, ml, deep learning❤❤

  • @NitinSharma-np6tm
    @NitinSharma-np6tm 3 месяца назад +1

    Shaktiman is gangadhar not vidhyadhar ma'am😂 @28:20

  • @anuragmaurya2796
    @anuragmaurya2796 10 месяцев назад

    Didi Exception handling in python !! par bhi video banayiye please 🙏❤❤❤❤

  • @DhritiYadav-iy4cv
    @DhritiYadav-iy4cv 3 месяца назад

    We love your classes,
    Please make video lecture on pygame development 😢
    Its our request
    Vote for lectures on pygame
    👇

  • @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()

  • @SmileYatra
    @SmileYatra 17 часов назад

    where can we find the notes of apna college? Shall it be only be available to those who have paid or what?

  • @ccydzggzh
    @ccydzggzh 7 месяцев назад +2

    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

  • @RajzMANISH
    @RajzMANISH 11 месяцев назад +60

    I'm waiting = 8th video 🧑‍💻🧑‍💻

    • @BizAutomate
      @BizAutomate 11 месяцев назад +17

      I'm waiting = 8th video🧑‍💻🧑‍💻
      ^
      SyntaxError: unterminated string literal (detected at line 1)

    • @mohiteshanshu2555
      @mohiteshanshu2555 9 месяцев назад +1

      ​@@BizAutomate😂

    • @Belovedme-1
      @Belovedme-1 4 месяца назад +1

      😂​@@BizAutomate

  • @SKSAIFIBNAEZHARARKO
    @SKSAIFIBNAEZHARARKO 4 месяца назад

    Practice question- 32:55

  • @MBILAL-g6t
    @MBILAL-g6t 11 месяцев назад +2

    Mam please one shot on react js

  • @PDPH742
    @PDPH742 8 месяцев назад

    Thank you for this lecture ❤ I very happy to learning at 9th 😊😊🎉

  • @harshiljana3701
    @harshiljana3701 4 месяца назад +1

    I didn't understand 38:00 where she writes "!= -1". Can someone explain.

  • @ravalvedant9377
    @ravalvedant9377 Месяц назад +1

    why did you write -1 . could you please explain.

  • @parth1240
    @parth1240 11 месяцев назад +1

    Oops concepts Tak hee hai aage bhi karaoge kya python ?

  • @thegodevil3703
    @thegodevil3703 3 месяца назад

    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"))

  • @aleezasoomro6155
    @aleezasoomro6155 3 месяца назад

    Ma’am, plz make a playlist for NLP!
    No credible information for NLP and computational linguistics.

  • @asimaqadri7226
    @asimaqadri7226 2 месяца назад +1

    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 Месяц назад

      I am facing same issues, Have you solved this problem, please tell me how to fix it?

    • @md.sabbirmahmud7388
      @md.sabbirmahmud7388 Месяц назад

      I am also facing same type issue. Have you findout any solution?​@@Yug-s7h

  • @pamparoy9616
    @pamparoy9616 9 месяцев назад +3

    I have not a laptop and PC but still learning

  • @GAMIDATA
    @GAMIDATA 6 месяцев назад +1

    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..... 🙏🏽🙏🏽

  • @omshubhgupta277
    @omshubhgupta277 8 месяцев назад +1

    why you don 't made video on exceptional handling, NumPy and the other topic

  • @Shehzadhacker
    @Shehzadhacker 11 месяцев назад +2

    What is file text bold,underlines

  • @mubashirhussain555
    @mubashirhussain555 10 месяцев назад +1

    please upload all lectures of python , your way of teaching is amazing , i request you to upload all lectures

  • @delight5186
    @delight5186 3 месяца назад

    its very help lectures

  • @JonyKamal7
    @JonyKamal7 11 месяцев назад

    DiDi 🙋 Ek Simple Si Request Hai
    Aap VS Code Windows Par Lecture Diya Karo.
    MacOS Me Thik Nhi Lagta.
    This is another type confusion with MacOS.

  • @Mikey-sc1rs
    @Mikey-sc1rs 11 месяцев назад +1

    Had a little difficulty in understanding recursion previous lecture any tips?

    • @rewatiraman2956
      @rewatiraman2956 11 месяцев назад

      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

  • @musicscanner6465
    @musicscanner6465 9 месяцев назад

    kya shaktiman hi vidhyadhar hai? or vidhyadhar hi shaktiman hai to gangadhar kaun hai?(28:20)

    • @Asadneon
      @Asadneon 9 месяцев назад

      focus on programing

  • @ImRich-xo8cm
    @ImRich-xo8cm 9 месяцев назад

    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 8 месяцев назад

      tumne yeto print nhi kerwaya ke kis line mai found hoa ?

  • @HarshSwaroop-u3t
    @HarshSwaroop-u3t 5 месяцев назад

    Thanks you shhh❤ radha ❤

  • @insidebest637
    @insidebest637 11 месяцев назад

    Please, make one video on decorators

  • @kdpr007
    @kdpr007 7 месяцев назад

    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?

  • @gyanaranjansahoo6927
    @gyanaranjansahoo6927 21 день назад

    mam please upload advance python course . we need it because in college our teacher dont complete the python course

  • @ramyarathimaheshwari9149
    @ramyarathimaheshwari9149 Месяц назад

    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???

  • @educentre6822
    @educentre6822 4 месяца назад

    my statement automatically showed up on next line, without mentioning "
    ", reason?? (19:55)

  • @rohanbajaj3724
    @rohanbajaj3724 6 месяцев назад

    can you also pls make something like this for specific libraries like numpy and datetime

  • @faisalrabbani7082
    @faisalrabbani7082 11 месяцев назад +2

    Thank you Mam.❤
    Mam i have a little question.
    after this session can you start django session?😥

  • @nitintripathi1779
    @nitintripathi1779 2 месяца назад

    MAM 28:21 *Gangadhar

  • @AniketBiswas-ab22
    @AniketBiswas-ab22 5 месяцев назад

    can you do some python project and upload it in a playlist .So it will be very helpful for us

  • @devanshsingh7097
    @devanshsingh7097 6 месяцев назад

    10:26 f = open("demo.txt","r")
    ^^^^^^^^^^^^^^^^^^^^
    FileNotFoundError: [Errno 2] No such file or directory: 'demo.txt'
    plz help me

  • @namratamankar9138
    @namratamankar9138 7 месяцев назад +2

    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.

  • @ansariremsha
    @ansariremsha 11 месяцев назад

    @ShradhaKhapra can you teach us regular expression in python GUI Thread Date and time database management using python

  • @premsharma2595
    @premsharma2595 5 месяцев назад +38

    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😂😂😂

  • @Pvgaming76
    @Pvgaming76 4 дня назад

    what about binary file manipulation?

  • @manofvideo-lv7bp
    @manofvideo-lv7bp 7 месяцев назад

    please make a video on hack a wifi passworh or crash a password
    🤓🤓🤓🤓

  • @anandmali4059
    @anandmali4059 7 месяцев назад

    i completed 9 vedios in one day so interesting teachinng please teach also flask and Django in depth