Functions

--Originally published at Waste your time

A function is a reusable code that is used to perform a single, related action.

Functions provide better modularity for your application and a high degree of code reusing.

So the most awesome thing is that you actually can make your own function. These functions are called user-defined functions.

  • Function blocks begin with the keyword def followed by the function name and parentheses ( ( ) ).

  • Any input parameters or arguments should be placed within these parentheses. You can also define parameters inside these parentheses.

  • The first statement of a function can be an optional statement – the documentation string of the function or docstring.

  • The code block within every function starts with a colon (:) and is indented.

  • The statement return [expression] exits a function, optionally passing back an expression to the caller. A return statement with no arguments is the same as return None.

i found something else that i didnt know, is that it exist Anonymus Functions, i founf out how  is permited using them and how to put it, but im not sure how to use them, so if annyone in #TC101 knows how and when its better to use a Annonymus Functions Please Share this with me

also i found this really cool website, its like Python For dommies, so if you are feelling like a dummy and you want to lear Python just click here

source here