I have a dice program, and i have this:
import random
if how_much == "32":
dice_32 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]
print(dice_32)
How i can made this shorter, to the list generates a number from 1 to 32 ( or bigger ) without making the list even bigger?
Aucun commentaire:
Enregistrer un commentaire