How can i transfer information from a form to another?

I am trying to transfer some variables from one form to another to have a more comfortable display of the results. I’m not very good with code, so I’d like something simple.

I tried to use a module as temporary storage for the information, but it’s not working.


Form 1

     print(Module2.get_b("worked"))

Module 2

a = “”
b = a
def get_b(b):

a = b
print(b)

def set_b():

print(a)
return a


Form 2

informatio = Module2.set_b();

print(informatio)

Welcome to the Forum!

This is a frequently-asked (and answered!) question, so Search should get you going in short order.

Also, remember the
```
lines, in the examples you were given when you created this topic? They’re there for a reason: to accurately show your code. Python is indentation-sensitive, but this Forum is not. For us to see your code as it really is, you’ll need to put
``` python
on a line by itself before your code, and
```
on a line by itself afterwards. Otherwise, the all-important indentation goes away.

2 Likes