作业2编写多级菜单

分系,利用字典

"北京“:{

  }

  ”昌平“:{

  }

    “沙河”:{

  }

  “朝阳”:{

  }

    "望京":{

  }

扫描二维码关注公众号,回复: 1447159 查看本文章

           "国贸”:{

  }

ald _las = False

while  not   als_las:

  for i in data:

  choile = iinpot ("选择输入1》》:")

  if  choile  in  data:

    while  not  ald_las:

    for in2   in   data(choile):

      print(‘、t.,i2)

  choile = inpot("选手输入.2>>:")

  if  choile  in data(choile):

   while  not  ald_las:

  for in3   in   data(choile):

  print(‘、t.,i3)

  choile2 = input ("最后一层,按b返回》》:”)

  if     choile  = ="b"

  pass

猜你喜欢

转载自www.cnblogs.com/asdccc/p/9131699.html