Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get length of list python

#get length of list in Python using for loop
List = [‘Python’,’Java’,’Kotlin’,’Machine Learning’,’Keras’]
size = 0
print(“Length of the input string:”)
for x in List:
  size+=1
  print(size)

Output:
Length of the input string:
5
Source by www.howtouselinux.com #
 
PREVIOUS NEXT
Tagged: #length #list #python
ADD COMMENT
Topic
Name
6+9 =