0 points

Prameters, Unpacking, Variables


dashboard

Sun Jun 07 2020 06:07:28 GMT+0000 (UTC)

Posted by @Amna #python

from sys import argv
script, first, second

print("The script is called:", script)
print("your first variable is:", first)
print("your second variable is:, second)
content_copy Copy

This method can also be used to pass variables to a script(python file). import is used to add features to your script from the Python feature set. The argv is the argument variable, a very standard name in programming that you will find used in many programming languages.

https://www.amazon.com/Learn-Python-Hard-Way-Introduction/dp/0134692888/ref=pd_lpo_14_img_0/145-2038954-9524128?_encoding=UTF8&pd_rd_i=0134692888&pd_rd_r=2c1aff3f-60bb-490b-a2d0-dfc06d81970a&pd_rd_w=t9wy6&pd_rd_wg=Bmxlp&pf_rd_p=7b36d496-f366-4631-94d3-61b87b52511b&pf_rd_r=RTCDC9M99JAV7NJ30VVE&psc=1&refRID=RTCDC9M99JAV7NJ30VVE