Python Question: Download Questions PDF
When you need ordered container of things, which will be manipulated, use lists.
Dictionary is key, value pair container and hence is not ordered. Use it when you need fast access to elements, not in ordered fashion. Lists are indexed and index of the list cannot be “string” e.g. list ['myelement'] is not a valid statement in python.
Download Python Interview Questions And Answers PDF
|Previous Question||Next Question|
|What are uses of lambda?||When do you use list vs. tuple vs. dictionary vs. set?|