PYTHON_TASKS Telegram 2747
Что выведет код?
def intersect(*seqs):
if len(seqs) > 2:
return intersect(seqs[0], intersect(*seqs[1:]))
seq1, seq2 = seqs[0], seqs[1]
res = []
for x in seq1:
if x in seq2:
res.append(x)
return res

x = intersect([1, 2, "a", "b"], (1, 4, "b"), {1, "b", "c"})
print(x)



tgoop.com/python_tasks/2747
Create:
Last Update:

Что выведет код?

def intersect(*seqs):
if len(seqs) > 2:
return intersect(seqs[0], intersect(*seqs[1:]))
seq1, seq2 = seqs[0], seqs[1]
res = []
for x in seq1:
if x in seq2:
res.append(x)
return res

x = intersect([1, 2, "a", "b"], (1, 4, "b"), {1, "b", "c"})
print(x)

BY Python Tasks & ML | Задачи по питону и машинному обучению


Share with your friend now:
tgoop.com/python_tasks/2747

View MORE
Open in Telegram


Telegram News

Date: |

Concise To upload a logo, click the Menu icon and select “Manage Channel.” In a new window, hit the Camera icon. 3How to create a Telegram channel? The Channel name and bio must be no more than 255 characters long Members can post their voice notes of themselves screaming. Interestingly, the group doesn’t allow to post anything else which might lead to an instant ban. As of now, there are more than 330 members in the group.
from us


Telegram Python Tasks & ML | Задачи по питону и машинному обучению
FROM American