Answers for "get list number python"

1

get list number python

my_list = [1,"hello world", 16.2]
len(my_list)
3
Posted by: Guest on May-10-2020
1

number of elements list python

>>> mylist = [1,2,3] #list
>>> len(mylist)
3
>>> word = 'hello' # string 
>>> len(word)
5
>>> vals = {'a':1,'b':2} #dictionary
>>> len(vals)
2
>>> tup = (4,5,6) # tuple 
>>> len(tup)
3
Posted by: Guest on October-16-2020

Code answers related to "get list number python"

Python Answers by Framework

Browse Popular Code Answers by Language