Aug-21-2018, 12:12 PM
It would be better to put those values in a dictionary. Also, you are iterating over the indexes of a string. It is better to iterate over the string itself:
import random testString = "abcd" data = {} for char in testString: data[char] = random.randint(2048, 4096)You can now access the random numbers with data['a'], data['b'], and so on.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures