Super argument parser
📁 lambda, method, asyncio
Write a script that accepts any number of parameters separated by an arbitrary number of spaces as arguments and outputs them in the same sequence to the screen, each on a separate line.
If there are no parameters, the script should output «no args».
Example 1
Input:
python3 solution.py 5 string 1
Output:
5
string
1
Example 2
Input:
python3 solution.py
Output:
no args
How to understand why it stops?
Add logs to see in which specific part of the code it stops.
How to restart it if a stop occurs?
Well, a stop hasn't actually occurred. A hang is not a stop. Or does the script actually finish execution but not with the expected result? These are very different things.
If it hangs when running from VSCode, you won't be able to detect or restart it - you need a watchdog here.
Log in to leave an answer