Python List/Tuple/Dict



List is a container for storing an identical objects. tuple is a container for storing non-identical objects.Lists are generally being iterated on , where as tuple is used in struct unpacking like,
temp = "I am %s ,my age is %d" % ('Srinivas',27)
Dictionary is a datastructure used for storing and retriving objects based on some key.

No comments:

Post a Comment