Mar-27-2018, 11:22 AM
Got it, thx for that!
Here's my fix:
Output:
Select a database:
1
You have chosen: 1 {'name': 'TEST11C'}
Desired output:
Select a database:
1
You have chosen: TEST11C
Here's my fix:
while True: print("Select a database: ") name = int(input()) if name in db_list.keys(): name = int(name) print("You have chosen: ", name, db_list[name]) else: print('You chosen wrong!')One other thing, how do I display only the database name and not the dictionary entry?
Output:
Select a database:
1
You have chosen: 1 {'name': 'TEST11C'}
Desired output:
Select a database:
1
You have chosen: TEST11C