rapid introduction to procedural programming route "northprint(routetype(route)printsnorth here we create new object reference called route and set it to refer to new int of value at this point we could use with route since division is valid operation for integers then we reuse the route object reference to refer to new str of value "north"and the int object is scheduled for garbage collection since now no object reference refers to it at this point using with route would cause typeerror to be raised since is not valid operation for string the type(function returns the data type (also known as the "class"of the data item it is given--this function can be very useful for testing and debuggingbut would not normally appear in production codesince there is better alternative as we will see in if we are experimenting with python code inside the interactive interpreter or in python shell such as the one provided by idlesimply typing the name of an object reference is enough to have python print its value for examplex "bluey "greenz 'bluexyz ('blue''green''blue'this is much more convenient than having to call the print(function all the timebut works only when using python interactively--any programs and modules that we write must use print(or similar functions to produce output notice that python displayed the last output in parentheses separated by commas--this signifies tuplethat isan ordered immutable sequence of objects we will cover tuples in the next piece piece # collection data types |it is often convenient to hold entire collections of data items python provides several collection data types that can hold itemsincluding associative arrays and sets but here we will introduce just twotuple and list python tuples and lists can be used to hold any number of data items of any data types tuples are immutableso once they are created we cannot change them lists are mutableso we can easily insert items and remove items whenever we want tuples are created using commas (,)as these examples show--and note that hereand from now onwe don' use bold to distinguish what you type"denmark""finland""norway""sweden('denmark''finland''norway''sweden'isinstance(