Python Set | function in set | add() remove() copy() | sequence | python shorts

Published: 08 February 2022
on channel: Mangesh Bagul
946
27

Perform following operations on given Set x= {10,20,30,40,50,60}
1] Add 75 element.
2] Delete 1st element from the set.
3] Create duplicate set of x.

program:

x = {10,20,30,40,50,60}
x.add(75)
print("Add 75 Element: \n",x)
x.remove(10)
print("Delete 1st Element: \n",x)
new_x = x.copy()
print("After duplicate: \n",new_x)

Output:
Add 75 Element:
{50, 20, 40, 10, 75, 60, 30}
Delete 1st Element:
{50, 20, 40, 75, 60, 30}
After duplicate:
{50, 20, 40, 75, 60, 30}

full python shorts playlist:
python problem solving approch:
   • python problem solving shorts  

new video for python programming
python code for problem solving approach.
python for beginners
learn python in simple way.
first clear basic concepts.
solve more problems and consistent practice.

String in Python Program
python programming for beginners
python programming examples
in-build functions in string in python
function in python
set in python
learn python

#shorts #ytshorts #pythonprogram #tutorial #education #learning #python programmer #python #subscribers #learnpython #programming

instagram:   / mangeshbagul15  


Watch video Python Set | function in set | add() remove() copy() | sequence | python shorts online without registration, duration hours minute second in high quality. This video was added by user Mangesh Bagul 08 February 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 946 once and liked it 27 people.