in factan entire list (or tuplecan be printed using the print(function directlyfor exampleprint(countries)but we often prefer to print collections using for loop (or list comprehensioncovered later)to achieve full control over the formatting for letter in "abcdefghijklmnopqrstuvwxyz"if letter in "aeiou"print(letter"is vowel"elseprint(letter"is consonant"in this snippet the first use of the in keyword is part of for statementwith the variable letter taking on the values " "" "and so on up to " "changing at each iteration of the loop on the snippet' second line we use in againbut this time as the membership testing operator notice also that this example shows nested suites the for loop' suite is the if else statementand both the if and the else branches have their own suites basic exception handling many of python' functions and methods indicate errors or other important events by raising an exception an exception is an object like any other python objectand when converted to string ( when printed)the exception produces message text simple form of the syntax for exception handlers is thistrytry_suite except exception as variable exception_suite except exceptionn as variablenexception_suiten note that the as variable part is optionalwe may care only that particular exception was raised and not be interested in its message text the full syntax is more sophisticatedfor exampleeach except clause can handle multiple exceptionsand there is an optional else clause all of this is covered in the logic works like this if the statements in the try block' suite all execute without raising an exceptionthe except blocks are skipped if an exception is raised inside the try blockcontrol is immediately passed to the suite corresponding to the first matching exception--this means that any statements in the suite that follow the one that caused the exception will not be executed if list comprehensions