Untitled

mail@pastecode.io avatar
unknown
python
17 days ago
373 B
1
Indexable
Never
import random

if __name__ == '__main__':
    a = random.sample(range(1, 50), 10)
    b = random.sample(range(1, 75), 15)

    print("Listy wyloswane:")
    print(a)
    print(b)

    result = []

    for element in a:
        if element in b and element not in result:
            result.append(element)

    print("\nLista wynikowa:")
    print(result)
Leave a Comment