dimanche 4 avril 2021

my pyhon code if [P2, P3, P4, P5] is [not None, None, None, None] it should work but isnt

why it doesn't work? it should work here

def say_hi(P1, P2 = None, P3 = None, P4 = None, P5 = None):
    if [P2, P3, P4, P5] is [not None, None, None, None]:
        print(f'hi {P1}')
        print(f'hi {P2}')

say_hi('Jack', 'Rose')

why my code doesn't work? it execute nothing

Aucun commentaire:

Enregistrer un commentaire