LearnPy Hub
← Tuples & Sets problems
Easy

Remove From a Set

Read words into a set and a word to remove. Remove it with discard() (no error if missing) and print the sorted words on one line, or empty.

Input

Two lines.

Output

One line.

Sample 1

Input
a b c
b
Output
a c

Sample 2

Input
a b
z
Output
a b
solution.py
Output appears here
Remove From a Set · Python practice problem · LearnPy Hub