how to write a functio in python code example Example: how to define a functio in python def a_function(input1): return input1 * 2