Loading...
Loading...
Loading...
Two training teams each list the courses they use. Find the courses that appear in both lists.
Print them in alphabetical order, one per line. If there are none, print None.
None.Example 1
Input
python sql git sql docker python
Output
python sql
Two courses are shared.
Example 2
Input
java c python go
Output
None
Nothing is shared.
Try the problem first. Open one hint at a time.
The courses that are in both lists are the intersection of two sets.
Make a set from each line, intersect them and sort the result before printing.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor