Is my code is right according to your question:- import threading e = threading.Event() def reading(): with open('text_file.txt', 'r') as f: global p p = f.readlines() e.set() def writing(): e.wait() j = 0 with open('fst.txt', 'w') as f1: for i in p: f1.writelines(i) j += 1 if j == 5: e.set() t1 = threading.Thread(target=reading) t2 = threading.Thread(target=writing) t1.start() t2.start()
@Sidharthgaming-z8rКүн бұрын
Nice explanation ❤
@VikasMishra-l3kКүн бұрын
Thanks 👍
@Eliminatetheviel.369Күн бұрын
Blessing from god. Respecte from heart
@Eliminatetheviel.369Күн бұрын
Thanks bro
@cse70pradeepsingh20Күн бұрын
bhai at 4:50 when you looped over for writing content in 2nd file the write operation should have overwritten the previous contents and it should have only shown the last line of 1st file . if i am wrong or am i missing something plz tell🙏
@solitudechronikles35213 күн бұрын
Why can't you just use English whole video
@Codeyug3 күн бұрын
Because most of students like this way.
@solitudechronikles35212 күн бұрын
@@Codeyug well I guess you now have international students
@Codeyug2 күн бұрын
@@solitudechronikles3521 yeah..I was thinking to create videos in English on other channel. I started it actually. I will definitely trqnsalte these videos in engkish in future..Sorry for that
@seriousblack91453 күн бұрын
love bhai \ /
@Codeyug3 күн бұрын
Thanks and please do share
@CodewithSAM-ej6fb4 күн бұрын
it was great but you messed it up, with __init__ .
@Codeyug3 күн бұрын
You can check my playlist for OOP in playlists section of my channel
@Eightminutesengineering4 күн бұрын
i am unable to do the path change on linum operating system can you guide more how to do that
@Codeyug3 күн бұрын
You can export a PATH related variable with the bin path
@VitorSousaFirpoFontes5 күн бұрын
Thank you!
@Codeyug3 күн бұрын
Thank you so much for watching!
@Eliminatetheviel.3695 күн бұрын
why you about us lock why not Rlock
@Eliminatetheviel.3695 күн бұрын
why we can't use .join() method
@Codeyug3 күн бұрын
Even if you put the code below join. It can be executed by multiple threads. But, locking ensures code execution by one thread only
@Eliminatetheviel.3692 күн бұрын
@@Codeyug Ok
@RAJNESHNISHAD-n2p6 күн бұрын
G
@Eliminatetheviel.3696 күн бұрын
Bro when i try the output is opposite here is my program can you tell why output opposite from threading import Thread import time def calculate(): total = sum(range(10**7)) print("Total:", total) # Multithreading start = time.time() t1 = Thread(target=calculate) t1.start() t1.join() print("Multithreading Time:", time.time() - start) # Sequential start = time.time() calculate() print("Sequential Time:", time.time() - start)
@Codeyug6 күн бұрын
@@Eliminatetheviel.369 will answer all of your questions..
@arpanjainff82146 күн бұрын
Code is not working
@Codeyug3 күн бұрын
Just debug it bro..there can be changes in QR module. What's the error
@Eliminatetheviel.3696 күн бұрын
why we add sleep in 11:37
@Codeyug3 күн бұрын
We use sleep in multithreading just for simulation purpose. It is like time taken by the video upload code
c=[1,2,2,2,2,3,3,4,5,5,5] a={} for i in c: if i in a: a[i]=a[i]+1 else: a[i]=1 print(a) unique_list=[] for items,values in a.items(): # print(items) if values==1: unique_list.append(items) print(unique_list)
@Eliminatetheviel.3698 күн бұрын
I think you forgot about GIL topic
@Codeyug3 күн бұрын
Yes! I will create a video on it surely
@Eliminatetheviel.3692 күн бұрын
@@Codeyug I will wait for it
@kondrisivasankar1408 күн бұрын
instead of writing for loop for converting into decimal we can simply write int(b1,2)
@Codeyug3 күн бұрын
You are right! That's a much cleaner way to do it in python
@ug18809 күн бұрын
You are in which company dude ?
@Codeyug8 күн бұрын
Exusia
@ajay-pi5jj10 күн бұрын
Can you make Django interview question answers video. In your explanations. Many interviewers want short answers like you gave here in last slide.
@Codeyug3 күн бұрын
Noted
@ajay-pi5jj10 күн бұрын
Thanx buddy, Can't thank you enough for this.
@Codeyug3 күн бұрын
Glad it was helpful!
@ug188011 күн бұрын
Good method...
@Codeyug3 күн бұрын
Thanks
@prateeksinghgambhir317212 күн бұрын
more videos on numpy?
@Codeyug3 күн бұрын
Sure, I will make more videos on Numpy.
@ComedyAlexa12 күн бұрын
Why? Sir number 4 topic?
@ComedyAlexa12 күн бұрын
Aaj Mera name esme example liya 😅😊😢😊
@ShekharWanjare-X12 күн бұрын
I appreciate your teaching skills ☺️
@Codeyug3 күн бұрын
Thanks, keep going
@Vedicvision311213 күн бұрын
10 9 8 7 6 5 4 3 2 1 0
@anonymouspurohit369113 күн бұрын
Sir i dont have words for you🥹🥹. You are a life saver, tomorrow is my exam. You taught very well.
@Codeyug3 күн бұрын
Thanks and please do share
@ITACHI-yp1jo15 күн бұрын
Desktop is not recognised internal and external command operable or batch file bata raha
@Codeyug3 күн бұрын
you have to change the path using cd command to directory of your python script. If everything is done correctly, please share more details.
@surajpawar63116 күн бұрын
str1="SuRaJpAwAr" output="" for i in str1: if i.isupper(): output=output+i.lower() else: i.islower() output=output+i.upper() print(output)
@Codeyug3 күн бұрын
Good!
@surajpawar63116 күн бұрын
input="aaaabbbbccd" output="" for i in set(input): var=str(input.count(i)) output=output+(var+i) print(output)
@Codeyug3 күн бұрын
Good!
@vinitabisht188216 күн бұрын
Thnkx sir ji
@Codeyug3 күн бұрын
Thanks and you can learn python on my channel. Please check playlist section
@Eliminatetheviel.36916 күн бұрын
Thanks
@Codeyug3 күн бұрын
Please do share with your friends.
@Eliminatetheviel.3692 күн бұрын
@@Codeyug Sure
@Eliminatetheviel.36916 күн бұрын
Learning Python ❌ Car collection ✔ by the way love you bro
@Codeyug3 күн бұрын
Thanks, I am glad you liked it!😂Love you!
@youvin490719 күн бұрын
Difference between lambda arguments: expression And lambda parameters: expression
@Codeyug3 күн бұрын
I think you want to compare lambda expression and IIFE expression in python, right?
@kunwardeepsingh129419 күн бұрын
sir, can you please help, in last video you said that in next video we will discuss how to access if a tag has multiple attributes under sub tags something like that where is that video?
@Codeyug3 күн бұрын
Sorry, I haven't made that video yet. Actually I am back here after some months. I will create video on it.
@abhianjali211119 күн бұрын
❤❤❤❤❤
@Codeyug3 күн бұрын
Thank you so much!
@Eliminatetheviel.36919 күн бұрын
Sir if there is more 10 value so what do. Is we write manually
@Codeyug3 күн бұрын
It will work using this i guess
@Anukumari-d2g20 күн бұрын
sir app python me advance level kai question karate ho kya i need it.
@Codeyug3 күн бұрын
I suggest follow my advance python playlist. Most of questions will be covered.
@Eliminatetheviel.36920 күн бұрын
Brother we also write print(b1.pages + b2.pages) so why we can not write this. Plese tell
@Codeyug3 күн бұрын
I just wanted to show the example. It shows that you can provide easy way for operations outside the class.
@sarikadevkar499021 күн бұрын
Best Explanation on this topic on youtube.. Thannk You ...
@Codeyug18 күн бұрын
Thanks! Keep learning and keep practicing.
@Eliminatetheviel.36921 күн бұрын
we can also write len(object_name.variable_name) so why we can't write this