Actualités

Without functions: by repeatedly writing the code to draw a triangle with. With a Python function call: by generating lots of coordinates and feeding them to your “draw triangle” function.
That is how to define a function in Python: it really is that easy, which is why so many people love Python! If you want to learn a bit more about using functions, check out How to call a function ...
In Python, the mere act of making a function call incurs a relatively large amount of overhead. If some function is called repeatedly in a tight loop, even if it isn’t a long-running function ...