DEV Community

zehra hindioğlu
zehra hindioğlu

Posted on

Function naming rules in Python

1. Use of Lowercase Letters and Underline (Snake Case)
Function names are written in lowercase letters and an underscore (_) is placed between the words.

2. Meaningful and Descriptive Names
Function names should clearly state what the function does.

3. Verb Usage
Function names often begin with a verb to indicate an action.

4. Avoid Abbreviations
Don't use abbreviations unless it's a well-known term or technology.

Image description

Top comments (1)

Collapse
 
jeffreyyang0213 profile image
Jeffrey

Great. I especially agree with the last rule to avoid abbreviations.
We should go ahead using full word as well I think. Thanks.

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay