主页
Python
Python zip() 函数
demo_ref_zip2
运行 ❯
×
更改方向
保存代码
更改主题
a = ("John", "Charles", "Mike") b = ("Jenny", "Christy", "Monica", "Vicky") x = zip(a, b) #use the tuple() function to display a readable version of the result: print(tuple(x))
(('John', 'Jenny'), ('Charles', 'Christy'), ('Mike', 'Monica'))