The method related to sets are:- 1) union()---->creates a new set with the unique elements from both the sets 2)update()----->applied on a set itself and it also adds unique elements from the both the sets into one of the sets 3) intersection()----> creates a new set with the common elements from both the sets 4)intersection_update()------> applied on a set itself and it also contains the common elements from both the sets 5)symmetric_difference--------> creates a new set with the elements from the both the sets that are not common in between 6)symmetric_difference_update-------> applied on a set itself and it contains elements from the sets that are not common inj between 7)difference------> creates a new set with the elements from a single set that are not common 8) difference_update-----> applied on a set itself and contains elements of a set that are not common 9)isdisjoint()---->checks if there are common elements between two sets 10)issuperset----> checks if a set is a superset of another set 11) issubset-----> checks is a set is subset of another set 12)add------> to add a element into a set 13) remove-------> to remove an elements from a set, but raises key error if the element is not present in the set 14) discard-----> to remove an element from a set, does not raises error if the lement is not present in the set 15) del------> not method, a keyword, to delete the complete set 16) clear-------> to clear all the elements of a set 17) in keyword used to check if a element is present in the set or not 18) pop()-----> to remove a random element from the set and also we can get that element
Present from Bangladesh Brother....#Day32 Done In Python, a set is a collection of unique elements. Sets are used to store multiple items in a single variable. Set items are unordered, unchangeable, and do not allow duplicate values. Here are some common methods that you can use with sets in Python: add(): Adds an element to the set clear(): Removes all the elements from the set copy(): Returns a copy of the set difference(): Returns the difference between two or more sets as a new set difference_update(): Removes the items in this set that are also included in another, specified set discard(): Removes an element from the set if it is present intersection(): Returns the intersection of two sets as a new set intersection_update(): Removes the items in this set that are not present in other, specified sets isdisjoint(): Returns True if two sets have a null intersection issubset(): Returns True if another set contains this set issuperset(): Returns True if this set contains another set pop(): Removes and returns an arbitary set element. Raise KeyError if the set is empty remove(): Removes an element from the set. If the element is not present, raises a KeyError symmetric_difference(): Returns the symmetric difference of two sets as a new set symmetric_difference_update(): Inserts the symmetric differences from this set and another union(): Returns the union of sets in a new set update(): Updates the set with the union of this set and others
@@marvelstudios9780yes, I'm in 8th grade and already learning coding,there are a few math things I don't understand but those things I will check in Google and learn
day 32 present i made a function to check if a number is present in given set or not(just for fun) s5={2,4,6,8,10,12,14,16} def check_presence(n , s): if n in s: return f"{n} is here" else: return f"{n} is absent" print(check_presence(123,s5)) //output// 123 is absent
All set method generate by ChatGPT AI: -> add(elem): Adds an element to the set. If the element is already present in the set, it has no effect. -> clear(): Removes all elements from the set. -> copy(): Returns a shallow copy of the set. -> difference(other_set): Returns a new set that is the difference between the set and other_set. The difference is defined as the set of elements that are present in the original set but not in other_set. -> difference_update(other_set): Removes all elements from the set that are also present in other_set. -> discard(elem): Removes an element from the set if it is present. If the element is not present, it has no effect. -> intersection(other_set): Returns a new set that is the intersection between the set and other_set. The intersection is defined as the set of elements that are present in both the original set and other_set. -> intersection_update(other_set): Removes all elements from the set that are not present in other_set. -> isdisjoint(other_set): Returns True if the set and other_set have no elements in common, and False otherwise. -> issubset(other_set): Returns True if the set is a subset of other_set, and False otherwise. -> issuperset(other_set): Returns True if the set is a superset of other_set, and False otherwise. -> pop(): Removes and returns an arbitrary element from the set. If the set is empty, it raises a KeyError exception. -> remove(elem): Removes an element from the set. If the element is not present, it raises a KeyError exception. -> symmetric_difference(other_set): Returns a new set that is the symmetric difference between the set and other_set. The symmetric difference is defined as the set of elements that are present in either the original set or other_set, but not both. -> symmetric_difference_update(other_set): Removes all elements from the set that are also present in other_set, and adds all elements that are present in other_set but not in the set. -> union(other_set): Returns a new set that is the union of the set and other_set. The union is defined as the set of elements that are present in either the original set or other_set, or both. -> update(other_set): Adds all elements from other_set to the set.
In first video more than 470k views and hey took a promise and now we are here with 4.6 k views .shows that only 1% in life are serious and become successful
Sir I found this course late but today I'm at day #32 My dream is to become a software developer and I'm in class 6 Some ppl might not believe the I'm in class 6 But I'm still able to understand the concept I also created the KBC program Sir you are a great teacher Peace :)
Please send me your KBC program and when you go higher in this course there was a project in which you needed to make a secret language when you make that please send me that also and make it from yourself without cheating.
name=input("Enter your name:") answers=[] print("Important: \"7 Crore for each right answer\"") wincount=0 print("Who was incharge of building Taj Mahal") print("(a) Asad Ullah Khan\t (b) Ayaz Al choudhary (c) Ustad-Ahmad Lahori\t(d) Tameez khan") choice=(input("Enter choice")) if choice == "c": wincount=wincount+1 print("your answer is right") else: print("Wrong") print(choice) answers.append(choice) print("Total wins:",wincount) print("How many continents are there") print("(a) Five \t(b) Seven (c) Eight\t(d) Ten") choice=(input("Enter your choice")) if choice =="b": wincount=wincount+1 print("your answer is right") else: print("Wrong") print(choice) answers.append(choice) print("Total wins:",wincount) print("What is the chemical symbol for gold?") print("(a) Go (b) Gd (c) Au (d) Ag)") choice=input("Enter Your Choice") if choice == "d": wincount=wincount+1 print("your answer is right") else: print("Wrong") print(choice) answers.append(choice) print("Total Wins:",wincount) rs=wincount*70000000 print("You Won Total",rs) if wincount==3: print("conratulations, Your all three answers are right") elif wincount == 2: print("You are good But you need to study more") elif wincount== 1: print("you are weak") else: print("YOu need to study") print("Your answers are:",answers) print("\"THE END\"")
In 9th std we had a chapter on sets . And I used to question the existence of this chapter . I used to think "whats the use of this in my life ??" , And today I thank my 9th std syllabus that my all concepts are clear 🙏
i tried multiple times but i think the pop function is giveing me the first value of the set every single time. infact i do not mix different types of values, the order is being maintained.
union unionupdat diff diffupd symmdiff ()---->checks if there are common elements between two sets 10)issuperset----> checks if a set is a superset of another set 11) issubset-----> checks is a set is subset of another set 12)add------> to add a element into a set 13) remove-------> to remove an elements from a set, but raises key error if the element is not present in the set 14) discard-----> to remove an element from a set, does not raises error if the lement is not present in the set 15) del------> not method, a keyword, to delete the complete set 16) clear-------> to clear all the elements of a set 17) in keyword used to check if a element is present in the set or not 18) pop()-----> to remove a random element from the set and also we can get that element
I have little problen in difference_update method Example: s1={1,2,3,4,5} s2={1,2,6,7,8} print(s1.difference(s2)) output: - {3,4,5} print(s1.difference_update(s2)) output: - None i want to know that why None Always come None please explain me anybody ??????? thanks in advance
Union me dono elements mix ho jaate hai dono set k aur us set me dono elements common bhi ho skte hai ... jabki update me kecal unhi element ko add Kiya Jaa skta jisko hm chahte hai
Hlo Harry bhai, I'm getting a problem in VS Code that is " Failed to save 'CoffeePrj.html': Insufficient permissions. Select 'Retry as Admin' to retry as administrator." Please harry Bhai i request u to that please make a video how to solve this Problem.
let me clear this out for you, 1) Sets are mutable like lists, which means you can insert or delete items in it as well as do other manipulations. 2) The values of sets should be immutable, hence it can't contain any mutable objects like lists, dicts or sets.
Hello I am working on an MYSQL integrity with python project I wanted that as the user gives the input of his date of birth it should calculate the user's age. I tried many times but it didn't set so please help
I am in 11th so I know set theory This class is understandable for those who read in 11th or passed But it can be tough for those who had not read set theory(class 11th concept)
The method related to sets are:-
1) union()---->creates a new set with the unique elements from both the sets
2)update()----->applied on a set itself and it also adds unique elements from the both the sets into one of the sets
3) intersection()----> creates a new set with the common elements from both the sets
4)intersection_update()------> applied on a set itself and it also contains the common elements from both the sets
5)symmetric_difference--------> creates a new set with the elements from the both the sets that are not common in between
6)symmetric_difference_update-------> applied on a set itself and it contains elements from the sets that are not common inj between
7)difference------> creates a new set with the elements from a single set that are not common
8) difference_update-----> applied on a set itself and contains elements of a set that are not common
9)isdisjoint()---->checks if there are common elements between two sets
10)issuperset----> checks if a set is a superset of another set
11) issubset-----> checks is a set is subset of another set
12)add------> to add a element into a set
13) remove-------> to remove an elements from a set, but raises key error if the element is not present in the set
14) discard-----> to remove an element from a set, does not raises error if the lement is not present in the set
15) del------> not method, a keyword, to delete the complete set
16) clear-------> to clear all the elements of a set
17) in keyword used to check if a element is present in the set or not
18) pop()-----> to remove a random element from the set and also we can get that element
Very nice
Thanks for the work done ✅
Explained it better than him, great work
very helpful
He also learned from him ❤@@vishukhajuria9573
Present from Bangladesh Brother....#Day32 Done
In Python, a set is a collection of unique elements. Sets are used to store multiple items in a single variable. Set items are unordered, unchangeable, and do not allow duplicate values.
Here are some common methods that you can use with sets in Python:
add(): Adds an element to the set
clear(): Removes all the elements from the set
copy(): Returns a copy of the set
difference(): Returns the difference between two or more sets as a new set
difference_update(): Removes the items in this set that are also included in another, specified set
discard(): Removes an element from the set if it is present
intersection(): Returns the intersection of two sets as a new set
intersection_update(): Removes the items in this set that are not present in other, specified sets
isdisjoint(): Returns True if two sets have a null intersection
issubset(): Returns True if another set contains this set
issuperset(): Returns True if this set contains another set
pop(): Removes and returns an arbitary set element. Raise KeyError if the set is empty
remove(): Removes an element from the set. If the element is not present, raises a KeyError
symmetric_difference(): Returns the symmetric difference of two sets as a new set
symmetric_difference_update(): Inserts the symmetric differences from this set and another
union(): Returns the union of sets in a new set
update(): Updates the set with the union of this set and others
bangladeshi musalman
@@narutokun203 YES
Masha Allah
🎉
some important to cover in this series as new than previous courses:
1) recap __init__(main):
2) turtle tutorial
3) taste of machine learning
That's why maths is important for coding 👍😊
but not complete math you can start coding without learning proper math
Ghanta@@marvelstudios9780
@@marvelstudios9780yes, I'm in 8th grade and already learning coding,there are a few math things I don't understand but those things I will check in Google and learn
Harry bhai aap Sandeep Maheshwari se mil ne jai ye na me bohot existed hu aap ki struggling story jan ne ke liye aap ki story hame inspiration degi
In fact ,Sandeep should request harry😘
Excited*
Han yrr bhai jao aap
This is very true , harry bhai pls go in sandeep maheshwaris show
He has normal story bro
Day #32 done. This video contained lots of info regarding the set methods. Great way explanation 👍
day 32 present
i made a function to check if a number is present in given set or not(just for fun)
s5={2,4,6,8,10,12,14,16}
def check_presence(n , s):
if n in s:
return f"{n} is here"
else:
return f"{n} is absent"
print(check_presence(123,s5))
//output//
123 is absent
you used f-Strings very cleverly..
@@rakeshwaghade9097 but that is how we use it
Thank god you posted this I was waiting for this
Thank you for your inspiration 💐
Present #32 day
You makes learning as fun and uderstable
Your are noble teacher on plants Earth who Never ask for to buy her paid courses.
His*
Shukra h maths padhi thi acche se, nhi to ab waps pdhni pdhti.
Harry Bhai ❤️❤️❤️❤️
Thank you sir your this two sets video's help me for my tomorrow presentation 😊🤗
In my class 8 set subject is there but at that time I think this is unusefull for me but now it completely worthfull 👍
You should use 'useless' instead of 'unusefull'. #English is also important for coding.
@@funfacts0070
i have also studied python in class 8 but, i only learn and understand
print("hello world")
and i came in class 9 🤣🤣🤣🤣🤣🤣😂😂😂😂😂😂😍😍
Best channel for learning coading
#day32 consistency maintain
20:29 2/12/2022
All set method generate by ChatGPT AI:
-> add(elem): Adds an element to the set. If the element is already present in the set, it has no effect.
-> clear(): Removes all elements from the set.
-> copy(): Returns a shallow copy of the set.
-> difference(other_set): Returns a new set that is the difference between the set and other_set. The difference is defined as the set of elements that are present in the original set but not in other_set.
-> difference_update(other_set): Removes all elements from the set that are also present in other_set.
-> discard(elem): Removes an element from the set if it is present. If the element is not present, it has no effect.
-> intersection(other_set): Returns a new set that is the intersection between the set and other_set. The intersection is defined as the set of elements that are present in both the original set and other_set.
-> intersection_update(other_set): Removes all elements from the set that are not present in other_set.
-> isdisjoint(other_set): Returns True if the set and other_set have no elements in common, and False otherwise.
-> issubset(other_set): Returns True if the set is a subset of other_set, and False otherwise.
-> issuperset(other_set): Returns True if the set is a superset of other_set, and False otherwise.
-> pop(): Removes and returns an arbitrary element from the set. If the set is empty, it raises a KeyError exception.
-> remove(elem): Removes an element from the set. If the element is not present, it raises a KeyError exception.
-> symmetric_difference(other_set): Returns a new set that is the symmetric difference between the set and other_set. The symmetric difference is defined as the set of elements that are present in either the original set or other_set, but not both.
-> symmetric_difference_update(other_set): Removes all elements from the set that are also present in other_set, and adds all elements that are present in other_set but not in the set.
-> union(other_set): Returns a new set that is the union of the set and other_set. The union is defined as the set of elements that are present in either the original set or other_set, or both.
-> update(other_set): Adds all elements from other_set to the set.
Thnx bro for quick summary
BHAI REPLIT ME DIRECT DAY 32 NAI AA RHA AHI MERE ME DAY 22 TAK KA HI ROADMAP DIKHA RHA HAI
thanks bro
Bro how is chatgpt ai working for you? It is not even opening in my PC. I've used Edge and now Firefox
THANKYOU
In first video more than 470k views and hey took a promise and now we are here with 4.6 k views
.shows that only 1% in life are serious and become successful
Hey Harry few days I am unwell, but today I am well and I continu my challenge. *I am present bhaiya*
Sir I found this course late but today I'm at day #32
My dream is to become a software developer and I'm in class 6
Some ppl might not believe the I'm in class 6
But I'm still able to understand the concept
I also created the KBC program
Sir you are a great teacher
Peace :)
Please send me your KBC program
and when you go higher in this course there was a project in which you needed to make a secret language when you make that please send me that also and make it from yourself without cheating.
@@bepositive271 are u going to hire her??😂
@@Raj_aditya111 No , becuase he is a kid i want to know what kind of intellegence he have.
@@bepositive271At this age I used to play with wasted flat tyre of my bicycle🤣🤣
Really now days these kids are very modern.
Appreciable work.
@@Raj_aditya111 What is your age??
we can use set() constructor for sets..
name=input("Enter your name:")
answers=[]
print("Important: \"7 Crore for each right answer\"")
wincount=0
print("Who was incharge of building Taj Mahal")
print("(a) Asad Ullah Khan\t (b) Ayaz Al choudhary
(c) Ustad-Ahmad Lahori\t(d) Tameez khan")
choice=(input("Enter choice"))
if choice == "c":
wincount=wincount+1
print("your answer is right")
else:
print("Wrong")
print(choice)
answers.append(choice)
print("Total wins:",wincount)
print("How many continents are there")
print("(a) Five \t(b) Seven
(c) Eight\t(d) Ten")
choice=(input("Enter your choice"))
if choice =="b":
wincount=wincount+1
print("your answer is right")
else:
print("Wrong")
print(choice)
answers.append(choice)
print("Total wins:",wincount)
print("What is the chemical symbol for gold?")
print("(a) Go (b) Gd (c) Au (d) Ag)")
choice=input("Enter Your Choice")
if choice == "d":
wincount=wincount+1
print("your answer is right")
else:
print("Wrong")
print(choice)
answers.append(choice)
print("Total Wins:",wincount)
rs=wincount*70000000
print("You Won Total",rs)
if wincount==3:
print("conratulations, Your all three answers are right")
elif wincount == 2:
print("You are good But you need to study more")
elif wincount== 1:
print("you are weak")
else:
print("YOu need to study")
print("Your answers are:",answers)
print("\"THE END\"")
I hope this message find you in best of your health. Sir start making video on ruby on rails full course as a beginner. thanks
after completion of #100daysofcode python start machine learning harry bhai
dekhte dekhte hum 1 month finish kor diya lol....thanks harry bhai
Pranam bhrata 🙏 apka bahutt baht dhanyawad 😄🧡😇🙏🙏😇🧡
even in udemy paid course, they never teach things such step by step, big thanks.
very good harry
so many fast in your carrier,god bless you bro
Dil ❤ se shukriya
Harry Bhai
In 9th std we had a chapter on sets . And I used to question the existence of this chapter . I used to think "whats the use of this in my life ??" , And today I thank my 9th std syllabus that my all concepts are clear 🙏
Day #32 Complete. Hope to complete this course on time.
Harry's work is very good .
Sir, please bring a video on the Quick Quiz Fibonacci series program in python!
Love you from Pakistan one the most Great Programer
apki videos mujhy bhut achi lagti hen
Asp. Net core ka bhi video banaiye please harry sir
Thank you for python course
Thank you bhaiya for such an amazing video
❤❤ love u harry bhai ❤❤❤ from odisha Jay jagganath❤
Hello Sir. Have been following your channel. Can You make a video on Tryton based server and FAST Api?
Great 👍👍
i tried multiple times but i think the pop function is giveing me the first value of the set every single time. infact i do not mix different types of values, the order is being maintained.
LOVE YOU HARRY BHAI❤
Great man with brain 🧠🧠
Every one has but depends on utilisation
Bro hum aisa bhi karsate hai
A ={1,2,34,}
F={44,5,4}
Q=A +F
Print(Q)
Thank you so much sir for creating this video!
This is important topic
It to much very hard topic
But your explain is very good.
#100dayschllangeofpython
Harry sir, I will be able to learn coding by subscribing to your channel. Where do you live sir? do you teach offline also
H
YOU ARE GRAET Harry bhai
Day #32 done.
#Completed Day#32 Love U Vai😍
union unionupdat diff diffupd symmdiff
()---->checks if there are common elements between two sets
10)issuperset----> checks if a set is a superset of another set
11) issubset-----> checks is a set is subset of another set
12)add------> to add a element into a set
13) remove-------> to remove an elements from a set, but raises key error if the element is not present in the set
14) discard-----> to remove an element from a set, does not raises error if the lement is not present in the set
15) del------> not method, a keyword, to delete the complete set
16) clear-------> to clear all the elements of a set
17) in keyword used to check if a element is present in the set or not
18) pop()-----> to remove a random element from the set and also we can get that element
bhai repl ko fork kaise kare..
Going to complete this series in 4 days #challenge
It's reminds me my school sets chapter in maths now i know where i can use this
TNX harry bhai
Sir 12th ke baad kisi college se gegree leni jaruri hai kya?
programming and skills learn Kiya. Kya company job degi Bina gegree ki
. Sir please reply
late chal raha hu but jada der nahi chalunga...present sir gg.
Present sir on Day-32 ✋✋
Thus , this video is proof that harry bro watched "Money heist"😏😏
I have little problen in difference_update method
Example:
s1={1,2,3,4,5}
s2={1,2,6,7,8}
print(s1.difference(s2)) output: - {3,4,5}
print(s1.difference_update(s2)) output: - None
i want to know that why None
Always come None please explain me anybody ???????
thanks in advance
cuz the update one updates the s1 set so it gives none. if you do it seperately and then print s1 then it will be s1
WAP IN C TO CHECK A NUMBER IS MAGIC NUMBER OR NOT USING POINTER Sir ji tell it by coding
Harry bhaiya please make a course of ethical hacking because you is teching very easy and free
First like and comment😁😁
now, this is called proper use of Money heist 😆
Jab helsinki aya to mere dimag men wahi helsinki aya 😂😂
@@rohanrajput_9 same
Present sir 🤚
Finaaly I reached day 32
#Day32 Present Sir
Present Harry Sir!
sir how you crack jee
please tell
Day 32 of 100 of python challenge completed. #100DaysofCode #100dayspythonchallenge
Sir ne toh class 11th ka pura sets chapter padha diya 😮
Osm😍
intersection and intersection_update both will work as same.
no. intersection update will update the set while intersection will not update. intersection will make a new set.
Day 32 🔥
#day32 completed
What is the difference between Union and Update ?
I think we can do the same using Union what Update does.....
Please give some reviews......
Union me dono elements mix ho jaate hai dono set k aur us set me dono elements common bhi ho skte hai ... jabki update me kecal unhi element ko add Kiya Jaa skta jisko hm chahte hai
Please give notes in description
Hlo Harry bhai, I'm getting a problem in VS Code that is " Failed to save 'CoffeePrj.html': Insufficient permissions. Select 'Retry as Admin' to retry as administrator." Please harry Bhai i request u to that please make a video how to solve this Problem.
A DOUBT!!
As we know that set is unchangeable. So how can we perform add(), update(), etc functions on it?
sets are unordered not unchangeabe .. : )
let me clear this out for you,
1) Sets are mutable like lists, which means you can insert or delete items in it as well as do other manipulations.
2) The values of sets should be immutable, hence it can't contain any mutable objects like lists, dicts or sets.
Finally tumhara comment mil gya. Mai aj aaya is confusion me ...😅
Presenttttt 🔥
Pls make a playlist of mojo course
Hello I am working on an MYSQL integrity with python project
I wanted that as the user gives the input of his date of birth it should calculate the user's age. I tried many times but it didn't set so please help
I am in 11th so I know set theory
This class is understandable for those who read in 11th or passed
But it can be tough for those who had not read set theory(class 11th concept)
Present Sir from Pakistan!
present today also sir ji........thank you sir
Day #32 in 100DaysOfCode. When you are not consistent but still want to cover backlogs in a single day
harry bhai thank you
u said sets are unchangeable. but the update method seems to change a set...pls clarify.
we r not changing any particular set value but combine one set values with another(i.e is updating )
@@VibesPop-editz Sets are Mutable as the set can be changed by adding and updating the items but the particular items in sets are immutable .
We leran that the computer processing is fastest than yhe light but in python 😂😂
Present Sir
Just want to ask at the time of union why the output came in a ordered manner because set does not give output as a ordered pair ?
Present Sir 🔥
hello sir can u explain merging nd joining operation of pandas
day 32 completed
Day 3 - Hope i will come tommorow again😊.
Day #32
issuperset():
yeh set method hum kb kb use karene wale h?
matlab kaha kaha kam aa sakta h?
Thanks
Its easy
It was 200% clear because I'm in 11 th class 😄
bhaiyaa mera toh .pop() use korke jo sabse chota element (int) main sirt ohi delete hoon raha hain .