Suppose if I want to print ".|." for (2k+1) times. Below is my snippet of code. How to do that? It is throwing a syntax error.
for k in range(0,n/2): print('.|.' * (2k+1))
Aucun commentaire:
Enregistrer un commentaire