+ 4
How can I mimic SL's input behaviour on my own IDE?
On SL's code playground, if you want to give multiple inputs, you just put them on separate lines. I'd like to find a way of doing the same thing on Pythonista. Is there a way I can create a docstring and get all input() calls to take the next line of the docstring in turn? I find it much easier to code on Pythonista but, if I want to provide lots of inputs for a code, I have to do them individually, whereas I can just paste all inputs into SL's input box and it runs automatically. Currently I need to rework my Pythonista code to read a docstring line by line which is a pain in the neck. I tried flirting with sys.stdin but I couldn't get it to do what I wanted. Is there a way to do this? https://code.sololearn.com/cO4VRjIuduYO/?ref=app
2 ответов