Let's say I have a Python script named script1.py that has the following code:
import sys name = sys.argv[1] print("Bye", name) And a second Python script script2.py that calls the first one:
import sys name = sys.argv[1] print("Hello", name) import script1 How can I pass an argument from the second script to the first one, as in the given examples?
I'd like the output to look like this when I run my script from the terminal:
>> python script2.py Bob Hello Bob Bye Bob