samedi 9 janvier 2016

Python: Assigning Random Integer to Variables in a Class

I have a large amount of variables within a class like this:

class Variables:
  num1 = "Text 1"

  num2 = "Text 2"

  num3 = "Text 3"

and so and so forth. I need to assign each variable a specific number from range (1,30) so that within the class, each variable is represented by a different integer value. Any help would be greatly appreciated. Thank You!




Aucun commentaire:

Enregistrer un commentaire