Talk:Python Concepts/Basic data types
Add topicAppearance
Latest comment: 10 years ago by Da5nsy in topic (Another) Error on the definition of dictionaries
Error on the definition of dictionaries
[edit source]"A type with multiple elements i.e. x = {1,2,3} where you address the elements with a text."
- No! x = {1,2,3} is a set. "where you address the elements with a text" Not necessarily! What a mess. — Fnielsen (discuss • contribs) 12:29, 16 October 2013 (UTC)
(Another) Error on the definition of dictionaries
[edit source]" The keys stay the same but the values are changeable. You can also only have one occurrence of a key in a dictionary, but you may have the values all be the same. Type: >>> x = {'key':'value1', 'key':'value2'} "
Should the above example not be >>> x = {'key1':'value', 'key2':'value'} ?
New to python and not confident, otherwise would change it myself?