Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

len python

mystring = 'Hello'
#Counts the amount of letters in the string
len(mystring)	# = 5	

#Can also count the number of items in a list
mylist = ['Hello', 'Goodbye', 'Morning']
len(mylist)		# = 3
Source by www.howtouselinux.com #
 
PREVIOUS NEXT
Tagged: #len #python
ADD COMMENT
Topic
Name
4+4 =