(continued from previous pagebelow line will go in infinite loop for in animalsfor in amif len( animals append(aprint(animalsor we can use 'animals[:]in the for loopinstead of 'animalas shown belowloopupdate py animals ['tiger''cat''dog'for in animals[:]if len( animals append(aprint(animalscheck items in the list the 'inkeyword can be used with 'ifstatementto check the value in the listloopupdate py def testnumber(num)if num in [ ]print("thanks"elseprint("number is not or "testnumber( testnumber( unpacking any iterable listtuple or set can be unpacked using assignment operator as belowx [ abc student ["tom" name*marksage student marks [ ( "two" ("five""six""seven") * (*cdy 'seven(continues on next page good practices