lundi 1 juillet 2019

Import random affecting for loop

I want to print 1 to 10 numbers with for loop but "import random" affecting my for loop and loop is working 2 times. Can you explain me thats why?

import random
for i in range(1,10):
    print(i)

My output:

1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9




Aucun commentaire:

Enregistrer un commentaire