Im not an expert, so be lenient.
Let's say I have two Python scripts:
script1.py:
def something(data):
answer = data + 1
return answer
script2.py:
import script1
data = 69
final = script1.something(data)
print final
If my understanding is correct, the above script2 should print 70, since script2 passed data
variable to script1, which added 1 and returned a sum of 70.
My question is that is such a method of passing data among imported modules correct? If not what is the correct way?
And what happens if the name of the variable passed to script1 isn't data
? What if it is something else like number
.