UrbanPro
true

Learn Python Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Identifiers in Python Programming

P
Pallavi R.
9 hrs ago 0 0

Identifiers:

These are the names that are used to identify the variables, functions, classes, modules or other objects. Whenever we define something in python and give it a name then we call it as an identifier.

Identifier Rules:

  1. Identifier cannot be a keyword.
  2. It is case sensitive.
  3. It may contain a single alphabet or a word or alpha-numeric.
  4. It cannot start with a digit, but can have a digit in the middle or last .
  5. It cannot have any other special character apart from ‘_’(underscore).
  6. It cannot start with a space or have a space in the middle.
  7. It can be of any length, but should be meaningful and readable.

Best Practices of Naming Identifiers

  • Use snake_case for variables and functions:

Eg: 

student_name, calculate_total, average_score

  • Use PascalCase for class names:

Eg: 

class StudentDetails:

pass

  • Use UPPERCASE for constants:

Eg:

PI = 3.141

  • Choose meaningful names:

Eg: 

x = 10 # vague
marks_obtained = 10 # better

0 Dislike
Follow 1

Please Enter a comment

Submit

Other Lessons for You

Machine Learning With Python
1. Course description: Machine Learning with Python has been designed for the provision of having strong hold in creating Machine learning algorithms with the base of Python. This has been preferred as...
J

What is the difference between PHP and PYTHON
Let's start with PHP: - Ideal for standard web development- Easy integration with MySQL- $_GET and $_POST built into the language- C-Esque syntax Primarily used on an Apache server (Routinely, you...

How Machine Learning Predict things - A Short Video for absolute beginners
Here is a short video for Machine Learning Beginners, who want to know how Machine Learning Algorithm predict things

Decorator Introduction
A decorator takes in a function, adds some functionality and returns it. Functions can be passed as arguments to another function like map, filter and reduce Function that take other functions as arguments...

A python program using the datetime module
Task : To write a program in Python to find out, in any given year, Friday the 13th dates i.e 13th day of a month which was a Friday. ...
X

Looking for Python Training Classes?

The best tutors for Python Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Python Training with the Best Tutors

The best Tutors for Python Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more