Code compression

Asked by Charles

Hi there.
I have similar big bunches of code in my project in different places. How i can have this block in single place and short links to it(or kind of it) in another places?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Milteven
Solved:
Last query:
Last reply:
Revision history for this message
Best Milteven (milteven12) said :
#1

Define the similar codes inside functions and call them when you need to.

Revision history for this message
Charles (charlesairborne) said :
#2

Tnx, this was easier than i expected.

def f():
    'randomcode'

f()

Revision history for this message
Charles (charlesairborne) said :
#3

Thanks Milteven, that solved my question.