Python Set pop() Method
Removes a random element from the set.
Syntax
Python
Copy Code
set.pop()
Example
Python
Copy Code
print('--------') laptopComponents = {'memory', 'processor', 'SSD', 'camera', 'keyboard'} print(laptopComponents.pop()) print(laptopComponents.pop()) print(laptopComponents.pop())
Output
SSD processor camera