Articles → PYTHON → Calculate The Length Of A Collection In PythonCalculate The Length Of A Collection In PythonIn this article, we will see how to calculate the length of a collection (list, tuple, dictionary).Example Length could be determined by len function in python. Consider the following exampletuple = ("Banana","Orange","Grapes","Straw berry") print("Length of the collection is:", len(tuple))Once you run the above program, you will get following output.Click to EnlargePosted By - Karan Gupta Posted On - Monday, February 25, 2019 Query/Feedback Your Email Id Subject Query/Feedback Characters remaining 250
tuple = ("Banana","Orange","Grapes","Straw berry") print("Length of the collection is:", len(tuple))
Query/Feedback