Passing any data from a script to another depends on what instance they represent. You then get the second instance and call it from the first instance.
# In script A
var b = *get the instance of B*
b.some_function(the_data)
or
# In script B
var a = *get the instance of A*
print(a.the_data) # do stuff with it
If they are both nodes, it looks like this:
# In script A
var b = get_node("Relative/Path/To/B")
b.some_function(the_data)
# or
b.the_data = the_data
But it's not the only way of course (they can be resources or pure classes).
You should learn how to manage multiple scripts in your project and make them interact, try to follow the tutorials in the doc (all of it): http://docs.godotengine.org/en/3.1/getting_started/step_by_step/scripting.html
Also that question was answered many times: https://godotengine.org/qa/search?q=from+another+script