+ 1
please find out why an error occurs in my code
sportsman = {"football": 'Messi', 'Ronaldo', "tennis": 'Federer', 'Nadal'} print(sportsman)
3 Respostas
+ 5
A key can have only one value. If you have more you need to use a tuple
+ 3
sportsman = {"football": {'Messi', 'Ronaldo'} , "tennis":{ 'Federer', 'Nadal'}}
print(sportsman)
+ 2
Thanks