/
๐Ÿ

Get arguments from command line

python

When we want to get parameter from command-line execution use below instruction

python
import sys
if len(sys.argv) == 1:
print("USAGE: python app.py <PASSWORD>")
else:
password = sys.argv[1]
print("Password", password)
Edit this page
logo
Hi Mohsen save your notes