I have this long if statement to see if a string is equal to any number up to 9. But it is so long and takes alot of space. Is there any way to make it shorter and more clean? Im new to programming.
if calculated == "1" or calculated == "2" or calculated == "3" or calculated == "4" or calculated == "5" or calculated == "6" or calculated == "7" or calculated == "8" or calculated == "9":
Aucun commentaire:
Enregistrer un commentaire