in [ ]a_tuple ( ( )in [ ]a_tuple[ 'fourtypeerror traceback (most recent call lastin (---- a_tuple[ 'fourtypeerror'tupleobject does not support item assignment remember that just because you can mutate an object does not mean that you always should such actions are known in programming as side effects for examplewhen writing functionany side effects should be explicitly communicated to the user in the function' documentation or comments if possiblei recommend trying to avoid side effects and favor immutabilityeven though there may be mutable objects involved scalar types python has small set of built-in types for handling numerical datastringsboolean (true or falsevaluesand dates and time see table - for list of the main scalar types date and time handling will be discussed separately as these are provided by the datetime module in the standard library table - standard python scalar types type description none the python "nullvalue (only one instance of the none object existsstr string type ascii-valued only in python and unicode in python unicode unicode string type float double-precision ( -bitfloating point number note there is no separate double type bool true or false value int signed integer with maximum value determined by the platform long arbitrary precision signed integer large int values are automatically converted to long numeric types the primary python types for numbers are int and float the size of the integer which can be stored as an int is dependent on your platform (whether or -bit)but python will transparently convert very large integer to longwhich can store arbitrarily large integers in [ ]ival in [ ]ival * out[ ] the basics www it-ebooks info