Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python length

# to get the length of a string or array, use the len() method
my_string = "Hello World"
my_list = ["apple", "banana", "orange"]

print(len(my_string)) # outputs 11
print(len(my_list)) # outputs 3
Source by www.howtouselinux.com #
 
PREVIOUS NEXT
Tagged: #python #length
ADD COMMENT
Topic
Name
7+9 =