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
# Возвращаем элементы первого массива, которые есть во втором | |
import random | |
import time | |
def intersection_with_loops(first_array, second_array): | |
result = [] | |
for first_element in first_array: | |
if first_element in second_array: | |
result.append(first_element) | |
return result |