Jul-08-2017, 07:19 PM
Sorry, I got my posts mixed up. I thought this was one without any code.
data = {'1': 'abcde', '2': '2357', '3': '11235'} while True: pin = input('pin? ') if pin in data: text = data[pin] while True: index = int(input('index? ')) if index < 0: break else: print(text[index]) elif pin[0] not in 'qQ': print('Invalid pin.') else: breakUntested, but that's the general idea.
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