Skip to content

Instantly share code, notes, and snippets.

@gimntut
Created October 22, 2021 17:41
Show Gist options
  • Save gimntut/d3c043edadc56bb29320bf999a0aba5c to your computer and use it in GitHub Desktop.
Save gimntut/d3c043edadc56bb29320bf999a0aba5c to your computer and use it in GitHub Desktop.
Наставничество
def task1(array1, array2):
# Самый быстрый по производительности код из тех, что я могу придумать
set2 = set(array2)
return [a for a in array1 if a not in set2]
def task2(array):
array2 = []
while array:
a = array.pop()
if a:
array2.append(a)
return array2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment