notice that the test results returned in the last two examples represent true and false values they print as the words true and falsebut now that we're using logical tests like these in earnesti should be bit more formal about what these names really mean in pythonas in most programming languagesan integer represents falseand an integer represents true in additionthoughpython recognizes any empty data structure as false and any nonempty data structure as true more generallythe notions of true and false are intrinsic properties of every object in python--each object is either true or falseas followsnumbers are false if zeroand true otherwise other objects are false if emptyand true otherwise table - gives examples of true and false values of objects in python table - example object truth values object value "spamtrue "false [ true [false {' ' true {false true false none false as one applicationbecause objects are true or false themselvesit' common to see python programmers code tests like if :whichassuming is stringis the same as if !''in other wordsyou can test the object itself to see if it contains anythinginstead of comparing it to an emptyand therefore falseobject of the same type (more on if statements in the next the none object as shown in the last row in table - python also provides special object called nonewhich is always considered to be false none was introduced briefly in it is the only value of special data type in python and typically serves as an empty placeholder (much like null pointer in cfor examplerecall that for lists you cannot assign to an offset unless that offset already exists--the list does not magically grow if you attempt an out-of-bounds assignment tuplesfilesand everything else