Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
def over(xs,ys):
xs の最初の値、ys の最初の値、xs の 2 番目の値、ys の 2 番目の値、というように新しいリストを作成する方法を教えてください。
例
([1,2,3], ["hi", "bye",True, False, 33]) ===> [1, "hi", 2, "bye", 3, True, False, 33]
>>> l1 [1, 2, 3] >>> l2 ['hi', 'bye', True, False, 33] >>> >>> >>> while l1 or l2: ... if l1: l1.pop(0) ... if l2: l2.pop(0) ... 1 'hi' 2 'bye' 3 True False 33