Argument Passing at Runtime in Python
Code
# test.py
import os
import sys
input_path = sys.argv[1]
input_path1 = sys.argv[2]
print(" \nYou Given : ", input_path, input_path1)
> python test.py Kuntal Samanta
Screenshot :
# test.py
import os
import sys
input_path = sys.argv[1]
input_path1 = sys.argv[2]
print(" \nYou Given : ", input_path, input_path1)
> python test.py Kuntal Samanta
Screenshot :
Comments
Post a Comment