(Jan-14-2021, 07:42 AM)Tricia279 Wrote: => thank you for your inspiration, I made it with a variable:
var = input()
pos0 = var
pos1 = var
pos2 = var
I hope that you do realize that this will not deliver result(s) you defined in your initial post. You wanted int but this will deliver str.
To illustrate problem and provide alternative using dictionary:
>>> initial = input('Enter initial value: ') Enter initial value: 160 >>> initial '160' >>> positions = dict.fromkeys((0, 1, 2), initial) # range(3) can be used instead of (0, 1, 2) >>> positions {0: '160', 1: '160', 2: '160'} >>> positions[0] '160' >>> positions[2] = 160 >>> positions {0: '160', 1: '160', 2: 160}
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.