Created
October 22, 2021 17:41
-
-
Save gimntut/d3c043edadc56bb29320bf999a0aba5c to your computer and use it in GitHub Desktop.
Наставничество
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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