There are so many data structures in python. some times I thought some of them may be useless, the only needed is list. Any one can tell me what is the function of each python data structures?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I assume you talk about collections, because lists without atomic values to put into lists are worthless. Still, there are lots of things lists don’t work well for. Of course, if you never (or so rarely elegance and performance doesn’t matter) need to [better choices in brackets]…
then you may get along with lists alone. And that’s just the uses cases the standard library collection types cover that I know off the top of my head. There are many other data types, and many more ways to use each collection.
I don’t know about you, but I’d estimate I don’t even use lists for half of my collection needs. It depends on the project, of course, but few problems only require sequences.