Python Basics
Python Basics
Python Basics
Expressions consist of
values(such as 2) and operators(such as +), and they can always
evaluate down to a single value
THE LEN() FUNCTION
print('The length of your name is:’)
print(len(myName))
Enter the following into the interactive shell to try this:
>>> len('hello’)
5
>>> len('My very energetic monster just scarfed nachos.’)
46
>>> len(‘’)
0