Ways to make python code more concise (functions etc)

Is that right, though? It was discussed here but I didn’t understand how exactly (or if) the code is saved