Python – Basic Syntax
Watch More Videos at:
Lecture By: Mr. Malhar Lathkar, Tutorials Point India Private Limited
Tag: tutorialspoint python, Python Programming, Programming, Python, Script Programming, Python – Basic Syntax, Basic Syntax
Xem Thêm Bài Viết PC Khác: https://diễnđàn.vn/pc
Nguồn: https://diễnđàn.vn
you should go more in to depth about programing syntax, you can go more in to depth about programing syntax without mentioning everything about it .
python identifier is the ‘name of identity’ given to any entities such as class, function, variable etc. An identifier is used to identify these entities in a unique way. An identifier must follow a specific naming convention in order to avoid any conflict with the keywords. The following rules must be followed while creating an identifier.
1. An identifier can contain lowercase alphabets (a to z) or uppercase alphabets (A to Z) or digits from 0 to 9 or an underscore (_). It could be a combination of all these entities. No other special characters are allowed. Some of the examples of valid identifier are var_5, tempVariable and fullName.
2. The first character of an identifier should not be a number. It can only start with a character or an underscore. Ex. var1 or _var1. An invalid identifier would be 1Var.
3. An identifier is case sensitive. Var1 and var1 are completely different variables.
4. An identifier can be of any length. However, it is always advised to keep it short and easy to understand.
5. Keywords should not be used as identifiers.
Note: It is a good practice to use camel Case to name the identifiers such as variables, functions etc. The class names must always start with uppercase character.
0:23–1:17 (Python – Basic Syntax explanation)
🙏