# your code goes hereimport operator dictionary = {1: 2, "a": "b"} print(operator.itemgetter(1)(dictionary))print(operator.itemgetter("a")(dictionary))
Standard input is empty
2 b
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!