mercredi 2 décembre 2020

How to write multiple lines of 'if' code in one line(python)?

Coming straight to the point, I want to write the following if statement in one line like if True:a=5(the if statement has only one line of code):

if True:
    a=5
    print("a=5")

(I'm happy that there is a tag )

Aucun commentaire:

Enregistrer un commentaire