This question already has an answer here:
I know how to write one-liner loops, with one loop, such asfor x in range(0,10): print(x)But I want something likefor x in range(0,10): if 1==1: print(x)However, this returns an error. How could I fix that?
for x in range(0,10): print(x)
for x in range(0,10): if 1==1: print(x)
Aucun commentaire:
Enregistrer un commentaire