fork download
  1. def interpret_command(command):
  2. commands_dict = {
  3. "add": "executing ADD operation",
  4. "+": "executing ADD operation",
  5. "sub": "executing SUBTRACT operation",
  6. "-": "executing SUBTRACT operation"
  7. }
  8. return commands_dict.get(command, "unknown command")
  9.  
  10. print(interpet_command('add'))
  11. print(interpet_command('+'))
  12. print(interpet_command('sub'))
  13. print(interpet_command('-'))
  14. print(interpet_command('unknown'))
Success #stdin #stdout 0.13s 14112KB
stdin
ADD
stdout
Standard output is empty