mercredi 29 avril 2020

List function with if statement [duplicate]

book = Python Crash Course by Eric Matthes page no. 133 problem = Checking That a List Is Not Empty i don't understand how this work

➊ requested_toppings = [] ➋ if requested_toppings:

how if requested_toppings works for non empty list. please explain

Aucun commentaire:

Enregistrer un commentaire