fork download
  1. next_arg = 1
  2. def input2(prompt):
  3. if len(sys.argv) <= 1:
  4. return input(prompt)
  5. else:
  6. global next_arg
  7. if next_arg >= len(sys.argv): sys.exit()
  8. value = sys.argv[next_arg]
  9. next_arg += 1
  10. print(prompt + "[" + value + "]")
  11. return value
Success #stdin #stdout 0.04s 63960KB
stdin
Standard input is empty
stdout
Standard output is empty