title: How to modify local variable in a function in Python?
body: <p>I would like to change the value of a parameter in an imported function without putting it as input. For instance:</p>
  
  <pre class="lang-py prettyprint-override"><code># in def_function.py
  def test(x):
      parameter1 = 50 # default value
      return parameter1*x
  
  # in main.py
  from def_function import test
  print(test(1)) # It should give me 50
  parameter1 = 10 # changing the value of parameter1 in test function
  print(test(1)) # It should give me 10
  </code></pre>