You shouldn't think of Python code being seperate just because it is visually seperated. Python is active from the moment you activate it, you just don't see it.
+ Start of layout
-> Python script
count = 10[/code:5i4fg5ka]
+ On button left clicked
-> Python script
count += 1[/code:5i4fg5ka]
+ On button right clicked
-> Python script
count -= 1[/code:5i4fg5ka]
Although visually seperated, every time button is left clicked it will add to count: 11, 12, 13, etc. And if button is right clicked it will substract from it. That's just one variable 'count' throughout the whole project, not three independent variables.
So, just use the events to your advantage, to control how and when Python is used.
+ Start of layout
-> Python script
temp = Sprite.X
def move(speed):
# your movement code here, incl. using temp[/code:5i4fg5ka]
+ Always
-> Python script
move(200)
# calls your previously defined function[/code:5i4fg5ka]
This all from my head (my pc is broken-down). But it should work.