Apr-11-2017, 11:35 AM
What is a more Pythonic way of doing this? I've seen some examples using tuples and dictionaries but they don't seem to return the same varialbe.
if integerLength == 1: n = 1 elif integerLength == 2: n = 10 elif integerLength == 3: n = 100 elif integerLength == 4: n = 1000 elif integerLength == 5: n = 10000 else: n = 100000