湘菜
-
python推导式
基本格式为: expression for item in sequence if condition names = [‘大湘菜’, ‘小湘菜’, ‘巨大湘菜’, ‘微小湘菜’]…
-
python迭代器和生成器
iter()用于创建迭代器,next()用于输出迭代器的下一个元素: names = [‘微湘菜’, ‘小湘菜’, ‘大湘菜’, ‘巨湘菜’] iterName = iter(na…
基本格式为: expression for item in sequence if condition names = [‘大湘菜’, ‘小湘菜’, ‘巨大湘菜’, ‘微小湘菜’]…
iter()用于创建迭代器,next()用于输出迭代器的下一个元素: names = [‘微湘菜’, ‘小湘菜’, ‘大湘菜’, ‘巨湘菜’] iterName = iter(na…