s = "monitor printer"words = s.split()result = words[1] + " " + words[0]print(result)
Standard input is empty
printer monitor
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!