Easy
Ignore a Missing Key
A dictionary is
{'a': 1, 'b': 2}. For each input key on one line, print its value inside with contextlib.suppress(KeyError):, so missing keys print nothing. Print done at the end.Input
Keys separated by spaces.
Output
Several lines.
Sample 1
Input
a b c
Output
1 2 done
Sample 2
Input
z
Output
done
Output appears here