小编acc*_*ash的帖子

2个循环列表 - Python

我有两个清单 -

lst1 = ["apple", "orange", "banana"]
lst2 = ["cherry", "grape", "pear"]
Run Code Online (Sandbox Code Playgroud)

我想按照这个顺序打印 -

apple
orange
banana
cherry
grape
pear
Run Code Online (Sandbox Code Playgroud)

我如何在1 for循环中执行此操作?

编辑:澄清我的问题 - 我不想将这两个列表添加到第三个列表然后打印.我可以直接在一个for循环中完成吗?

python loops list

-1
推荐指数
1
解决办法
77
查看次数

标签 统计

list ×1

loops ×1

python ×1