+ 3
Dictionaries
a={1, 2} What does it mean? If i try to do "print(a[1])", there's error. I thought, that this script means "0" as value and 1,2 as keys(a={1:0,2:0}), but if it was true, there wouldn't be any error. Help
4 Respuestas
+ 2
Because "a" is a set and set object does not support indexing
dictionary synax is like this:
{key: value, ...}
+ 1
Mert Yazıcı "set" is one of types of data or "a" is dictionary or what? Sorry, can you explain it again, please
+ 1
Mert Yazıcı thaks!