Python Question:
Download Questions PDF

Do they know a tuple/list/dict when they see it?


Dictionaries are consisting of pair of keys and {’key’:'value’}.


Keys are unique but values can be same. The main difference between list and tuple is you can change the list but you cannot change the tuple. Tuple can be used as keys in mapping where list is not.

Download Python Interview Questions And Answers PDF

Previous QuestionNext Question
When do you use list vs. tuple vs. dictionary vs. set?What is used to represent Strings in Python? Is double quotes used for String representation or single quotes used for String representation in Python?