Python function name convention is to use a lowercase word or words. Separate words by underscores to improve readability.
function #OR my_function
For example, if you have a function that calculates the sum of two numbers, you could name it
Python function name convention examples
A simple example code function takes two numbers as input and returns their sum.
def calculate_sum(num1, num2):
return num1 + num2
Comment if you have any doubts or suggestions on this Python name convention topic.
Note: IDE: PyCharm 2021.3.3 (Community Edition)
All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.
Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.