we cannot access individual values in a set but we can all access all the elements together.
Enter the following code to try and access sets in python.
players = set(['Madueke','Reece James','Cole Palmer','Raheem Sterling','Levi Colwil','Thiago Silva',
'Mudryk','cucurella','Nkunku Christopher'])
for player in players:
print(player)
output
When the above code is executed, it produces the following result:
Thiago Silva
Reece James
Levi Colwil
cucurella
Mudryk
Raheem Sterling
Cole Palmer
Top comments (0)