Advertisement
harsh7i

PassingParameterOutside.py

Mar 21st, 2023 (edited)
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. import argparse
  2. parser = argparse.ArgumentParser()
  3.  
  4.  
  5. parser.add_argument('v1')
  6. parser.add_argument('v2')
  7.  
  8. args = parser.parse_args()
  9.  
  10. print ('value of variable a is:',args.v1)
  11. print ('value of variable b is:',args.v2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement