Set Data Structure
PYTHON PROGRAMMING

Program To Send SMS Using pop() in Set Data Structure

Program

				
					s={30,33,24,26,26,25,27,27,23,22,21}
while len(s)!=0:
  n=s.pop()
  print("Sending sms to the mobile number",n)
				
			

Output

				
					E:\>py program1.py
Sending sms to the mobile number 33
Sending sms to the mobile number 21
Sending sms to the mobile number 22
Sending sms to the mobile number 23
Sending sms to the mobile number 24
Sending sms to the mobile number 25
Sending sms to the mobile number 26
Sending sms to the mobile number 27
Sending sms to the mobile number 30