Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13981

Calling a python script with a parameter

$
0
0

I am very new to python and having problem in doing a probably very basic thing. I have a python script script1.py which calculates some quantity and this quantity depends on the value of a variable B initialised inside the script. I have another script script2.py which does some calculations and returns a value. I want to pass this value as the value of the variable B in script1. How can I do this. In particular

  1. How do I modify script1 such that it takes a input and uses this input for B?
  2. How do I pass the value from script2 to script1?

I am not sure how to go about it. Any help will be appreciated


Viewing all articles
Browse latest Browse all 13981

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>