So which is better and why?
def my_function():
or
def myFunction():
This question is related to
python
naming-conventions
pep8
Function names should be lowercase, with words separated by underscores as necessary to improve readability. mixedCase is allowed only in contexts where that's already the prevailing style
Check out its already been answered, click here
PEP 8 advises the first form for readability. You can find it here.
Function names should be lowercase, with words separated by underscores as necessary to improve readability.
Source: Stackoverflow.com