0
Problem with python dictionaries
i have two teams(a) and team(b) each of my teams has two subteams i. e team(a) has subteams(b)and(c) and so with team(b) each of the subteams has their different enrollment requirements. i want to prompt a user to first of all enter the name of the team he wants to enroll in after that he is then provided with the subteams option for him to select before he can now see the selected subteam's enrollment requirements
7 Answers
0
yes and what's the problem exactly?
0
leshark you were close but it returned a key error may be you can modify and actually use random words as arguments for better clarity and understanding... thanks
0
@ramzi i tried to be very descriptive in my question i dunno how to break it down anymore
0
am receiving a syntax error while using nested dictionaries as suggested maybe you can give me the code at the play ground.
i want something like this:
footwears={shoes={'high heels': '6inches, 12inches, 'flat shoes': '2inches, '1inch'}
print 'choose your foot wear'
answer = input #in this case i type shoes
if answer in footwears: #yes cos i chose shoes
print (high heels or flat shoes)
choice = input #Here i choose high heels
print(footwears[choice])
here is just an example of what i want pls.
0
@prince, everything is working, you just enter not correct input!!!
try:
team_a
b
or ream_a
c
0
thanks all your answers helped