I am having a hard time solving what I think SHOULD be an easy problem. I have a dictionary that consists of a key(interger that represents an option #) and a value (string that is a description of the option). I need to print each key value pair on a separate line inside of the input function.
file_codes = {2: 'iosFile',
3: 'startup',
4: 'running'}
host_ip = '10.10.10.10'
users_numeric_entry = int(input(f'Please pick a configuration to copy for: {host_ip}\n))
Input prompt should be like below:
Please pick a configuration to copy for: 10.10.10.10
2 - iosFile
3 - startup
4 - running
:
I feel that I need a to create a for loop to iterate through the dictionary, but I am having a hard time coming up with the code to achieve my desired output.