linux python
The code is as follows as an example.
practice.py
import sys
a = sys.argv
print(a)
Execute the following command
$ python3 practice_home.py linux windows abc
['practice_home.py', 'linux', 'windows', 'abc']
Then, __ ['practice_home.py','linux','windows','abc'] __ is output as above.
That is, sys.argv contains the characters after __ $ pyton3__ __ </ font> __.
Recommended Posts