This question already has an answer here:
- Python 3 print without parenthesis 6 answers
I want to generate a random number between 1 to 10 but when i use
import random
for x in range(10):
print random.randint(1,10)
The output says
print random.randint(1,10)
SyntaxError: invalid syntax
Why wont it work?
Aucun commentaire:
Enregistrer un commentaire