Articles → PYTHON → Command Line Arguments In Python

Command Line Arguments In Python






What Are Command Line Arguments?






python gyan.py "A", "B"





Accessing Command Line Arguments In Code





Example




import sys

if len(sys.argv) > 0:
   print(sys.argv)




Picture showing the output of command line arguments in python



Posted By  -  Karan Gupta
 
Posted On  -  Sunday, September 12, 2021

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250