python is pretty straightforwards.
- dynamically typed
- 1st class objects
Python releases styleguides with best practices in the form of PEPs. (these are also used to propose changes to the python language). You can look them up here:
In particular PEP8 is the current style-guide used by the python project itself, and is used by most python projects: https://www.python.org/dev/peps/pep-0008/
class MyClass(object): """ A docstring """ def print_stuff(): """ Prints word 'stuff """ print('print stuff') def capitalize(text): """ Capitalizes and prints 'stuff' Args: text (str): text you'd like to capitalize Returns: str: Capitalized text. """ capitalized_text = text.upper() return capitalized_text def hello_world(): print('hello world') # this code only runs if module is run directly # (and not when imported) if __name__ == '__main__': instance = MyClass() instance.print_stuff() instance.capitalize('hi there')