pet = 'Fido'
pet'Fido'
=) to objects.Here are some data types built-in to the Python language:
intfloatstrboollisttuplesetdictThe Boolean (bool) type has two values: True and False.
'Hello'"Goodbye"'''Yesterday'''"""Tomorrow"""'Mike Wazowski said: "My name\'s Mike Wazowski!"'
There are A variety of different methods to transform strings or extract information from them.
len():.upper():.lower():int to float:int to a str:float to an int (it will round down to the nearest full integer).ValueError: could not convert string to float: 'five'
Detailed traceback:
File "<string>", line 1, in <module>
TypeError: float() argument must be a string or a number, not 'NoneType'
Detailed traceback:
File "<string>", line 1, in <module>