File Handling - Binary File | pickle module | dump() & load() | CBSE Class12 - CS

Поделиться
HTML-код
  • Опубликовано: 20 сен 2024
  • 🔥FREE Classes for CS/IP 🔥
    🔥FREE UNLOCK Code - “LALIVE” 🔥
    unacademy.com/...
    Telegram LINK - t.me/TECHQueen...
    Instagram ID - / iam_tech_queen
    Complete Playlist for Class 11 CS -
    • Full Playlist CBSE Cla...
    Complete Playlist for Class 11 IP-
    • Full Playlist CBSE Cla...

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

  • @rishabh6058
    @rishabh6058 5 месяцев назад

    20:56
    ma'am this also works
    import pickle
    with open("bot.dat","rb") as p:
    x=pickle.load(p)
    for i in x:
    print(i,end="")

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

    14:00
    Ma'am aapne wb mode use kiya tha then " FileBi.dat " ka content overwrite ho jana chahea tha ... But this didnt happen ?

  • @kailasatram
    @kailasatram Год назад

    18:00, ma'am yaha pe write function use ke wajah se data file me overwrite hona chahiye tha na, phir vo list ki tarah kaise store kiya, write () to overwrite karta hai na?

    • @TECHQueenLovejeetArora
      @TECHQueenLovejeetArora  Год назад +1

      write() overwrite nahi krta, W mode Overwrite krta hai, write() to only ek Function hai.

  • @dazzlingscript-freehand
    @dazzlingscript-freehand Год назад +1

    Thanks a ton mam

  • @fungamer4000
    @fungamer4000 Год назад +1

    mam notes kaha milenge ?

  • @RamaAnand
    @RamaAnand Год назад

    when i am using binary file as .dat or .bi.... program executed properly, showing result also....dump and load working..... but in file its showing some msg like"file was loaded in a wrong encoding" and "file was explicitly re-assigned to plain text"..... why its showing..... and how to remove

    • @RamaAnand
      @RamaAnand Год назад

      Using pycharm

    • @TECHQueenLovejeetArora
      @TECHQueenLovejeetArora  Год назад

      @@RamaAnand hii plz check here, 2 attachments are given ,
      youtrack.jetbrains.com/issue/IDEA-290488

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

    Thx ma'am ❤❤😊

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

    Mam aapka samjhane ka tareeka bahut acha hai bas thoda kisi bhi topic ke point pe baat kara karo toh aur ache se samjh me aayega

  • @tinkurathore1943
    @tinkurathore1943 Год назад +7

    Ma'am screen chhoti pad rhi hai........ aap ki avaaz se bhi padh lenge......... Chehra dikhana ki koi need nhi hai..... 🙏❤️

  • @user-cc4lj3ge5u
    @user-cc4lj3ge5u 6 месяцев назад

    Mam should I concentrate on the notes or on you ? 🥰

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

    3:19 mam notification bnd krdo mai apna notification check krne lgta 😂(just joke)

  • @englishbyshivamsharma5331
    @englishbyshivamsharma5331 Год назад

    Good evening mam

  • @sneha4236
    @sneha4236 Год назад +1

    Mam kabhi aap bina makeup ka class lo 😂😂😉

    • @soniakmeme7848
      @soniakmeme7848 Год назад +2

      Aur tum kabhi bina comment kare pad bhi liya karo😄😄

  • @ektasharma5330
    @ektasharma5330 Год назад

    import pickle
    def bfile():
    bfile=open("p.txt","wb")
    pickle.dump("hii my name is ekta",bfile)
    pickle.dump(28888,bfile)
    pickle.dump({"w":34,"r":45},bfile)
    bfile()
    def bfile_2():
    bfile_2=open("p.txt","rb")
    try:
    while true:
    data=pickle.load(bfile_2)
    print(data)
    except:
    bfile_2.close()
    bfile_2()
    plz hlp me mam mera load data file show nhi horhi only dump wali hi show ho rhi h

    • @AYArchanaYadav
      @AYArchanaYadav Год назад +1

      Hi Ekta, Here is the correct program
      import pickle
      def bfile():
      bfile=open("p.txt","wb")
      pickle.dump("hii my name is ekta",bfile)
      pickle.dump(28888,bfile)
      pickle.dump({"w":34,"r":45},bfile)
      bfile()
      def bfile_2():
      bfile_2=open("p.txt","rb")
      try:
      while True:
      data=pickle.load(bfile_2)
      print(data)
      except:
      bfile_2.close()
      bfile_2()
      There were 2 mistakes while True hoga na ki true, and second print(data) me indent aayega, else vo loop k bhaar jaa k print. That means kuch print ni hoga

    • @ektasharma5330
      @ektasharma5330 Год назад

      @@AYArchanaYadav thnku

    • @Sahil-sc7ot
      @Sahil-sc7ot Год назад

      @@ektasharma5330 @ARCHANA YADAV ji aap .txt file pr kam kr rhe h tho binary function use krne ka koi sense ni h either you use .dat file or better use text file syntax and methods