Learn different operations using sets in python

preview_player
Показать описание
In this video, I tried to perform different operations using sets in python programming language.

Starting point for each section:
00:29 --- Create a set and print it
01:35 --- Check the length
02:02 --- Duplicacy is not allowed in set
02:55 --- Iterate through a set using for loop
03:33 --- Iterate through a set using while loop
04:59 --- Create a set using set() function
06:00 --- Add an item to a set using add() method
06:49 --- Remove an item from a set using remove() method
07:43 --- Insert items from another set using update() method
08:35 --- Create a new set using copy() method
09:48 --- Join two sets using union() method
11:03 --- Discard values using difference() method
12:51 --- Discard values from the first set using difference_update() method
14:47 --- Remove an item from set using discard() method
15:55 --- Remove a random item from set using pop() method
16:56 --- Select common items within sets using intersection() method
18:44 --- Select common items and update the first set using intersection_update() method
20:14 --- Check intersection between two sets using isdisjoint() method
22:20 --- Check subset using issubset() method
24:02 --- Check superset using issuperset() method
26:07 --- Return items not present in both sets using symmetric_difference() method
27:58 --- Return items not present in both sets and update the first set using symmetric_difference_update() method
29:26 --- Remove everything from a set using clear() method

#data_science #jupyter_notebook #python #python_sets
Рекомендации по теме
visit shbcf.ru