python의 학습노트/002-5.1(2018-5-21)

수정이 필요합니다.
_3_food_list={
    '  ':{
        '  ':{
                 '   ':["  ","  ","  "],
                 '   ':["  ","  ","  "]
                },
        '  ':{' ':["  ","  ","  "],
                 '  ':["  ","  ","  "],
                 '  ':["  ","  ","  "]
                }
        },
    '  ':{
          '  ':{
                   '     ':["  ","  ","  "],
                    '    ':["  ","  ","  "]
                   },
          '  ':{
                   '   ':["  ","  "],
                   '       ':["  ","  ","  "]
                  }
           },
    '  ':{
         '  ':{
                  '    ':[" ","  "],
                  '    ':[" ","  "]
                 },
         '  ':{
                  '    ':["  ","  "],
                  '  ':["  ","  "]
               }
    }
}
exit_flag=False
while not exit_flag :
    for i in _3_food_list:
        print(i)
    choice1=input(">>>please input 1:")
    while not exit_flag:
      if choice1 in _3_food_list:
         for i in _3_food_list[choice1]:
             print(i)
         choice2=input("\t>>>please input 2:")
         if choice2 in _3_food_list[choice1]:
            for i in _3_food_list[choice1][choice2]:
                print(i)
            choice3=input("\t\t>>>please input 3 :")
            while not exit_flag:
                if choice3 in _3_food_list[choice1][choice2]:
                     for i in _3_food_list[choice1][choice2][choice3]:
                        print(i)
                     choice4=input("\t\t\t>>>please iput 4 :")

                     if choice4 in _3_food_list[choice1][choice2][choice3]:
                           print(choice4 )
                           choice5=input(">>>the last back(b):")
                           if choice5=='b':
                               pass
                           elif choice5=='q':
                               exit_flag =True
                     if choice4=='b':
                         break
                     elif choice4=='q':
                        exit_flag =True
                if choice3 == 'b':
                   break
                elif choice3== 'q':
                   exit_flag = True
         if choice2 == 'b':
             break
         elif choice2 == 'q':
             exit_flag = True
      if choice1 == 'b':
          break
      elif choice1 == 'q':
          exit_flag = True

좋은 웹페이지 즐겨찾기