Solve problem "The intersection of sets" online - Learn Python 3 - Snakify

Problem «The intersection of sets» (Medium)


Statement

Given two lists of numbers. Find all the numbers that occur in both the first and the second list and print them in ascending order.

Even this task can be solved in one line of code.


In all the problems input the data using input() and print the result using print().



Saved solutions

Tests

Input Correct answer Result
1 3 2
4 3 2
2 3
1 2 6 4 5 7
10 2 3 4 8
2 4
82 54 91 100 70 33 88 14 52 48 56 20 63 16 22 23 30 8 84 75 45
10 44 77 90 43 75 25 24 5 21 71 70 83 68 18 92 81 57 27 67 48 6
48 70 75