lundi 20 avril 2020

Use of if x == True in python [duplicate]

Got a question, looked up to see if it was already answered, and only found 1 post which was python2, and not sure if there are differences. I am just thinking if there are any differences in using if var_name == True: and if var_name: I cant see any use point in using if var_name == True ever. But maybe there is something I am missing and if any of you know what I should use and when for best practice, let me know.

Aucun commentaire:

Enregistrer un commentaire