Jan-24-2020, 06:19 AM
So no I am on to my next part of this.
Please let me know if you would prefer me to create a new thread. But it is a continuation of this project for me.
I am trying to create a dynamic menu system that will produce menu items based on what items are specified in the _number_ranges dictionary. .
Since I have defined, StKilda Rd, Mulgrave and Rhodes. I would like the find_available_n function to Print the options
Please let me know if you would prefer me to create a new thread. But it is a continuation of this project for me.
I am trying to create a dynamic menu system that will produce menu items based on what items are specified in the _number_ranges dictionary. .
# Define Site Ranges Dictionary _number_ranges = { "549StKilda": { 'start': 61392697000, 'end': 61392697999, 'name': "549 StKilda Rd" }, "Mulgrave": { 'start': 61385849100, 'end': 61385849199, 'name': "Mulgrave" }, "Rhodes": { 'start': 61298169000, 'end': 61298169999, 'name': "Rhodes" }, "Not Defined Number": { 'start': 0, 'end': 99999999999, 'name': "NON Number" }, def find_available_n(): for num_range in _number_ranges: print(num_range) #Ask for Choice choose_range = input("Select Range: ") return choose_rangeI am trying to create a menu system that will provide number options base of the number of ranges I have defined. Currently my code will only produce the first range.
Since I have defined, StKilda Rd, Mulgrave and Rhodes. I would like the find_available_n function to Print the options
print ("""Select Range: 1. for StKilda Rd 2. for Mulgrave 3. for Rhodes 4. for NON Number""")Then If I add a another range to the define dictionary of ranges _number_ranges i would like that to be added as well.