We can create them simply by enclosing characters in quotes. Python treats single quotes ( ' ' ) the same as double quotes( " " ).
We can create them simply by enclosing characters in quotes. Python treats single quotes ( ' ' ) the same as double quotes( " " ).
Delete List Elements:
To remove a list element, we can use either the "del" statement if we know exactly which element(s) we are deleting or the remove( ) method or the pop( ) method.
Creating lists:
A list can be created by defining it within [ ].
A numbered list can also be created with the "range function" which takes start and stop values and an increment.
Comparison operators return Boolean values, that is, True or False.
The following comparison operators are supported by Python language
== - equal
!= - not equal (read as Bang equal)
Operator precedence determines the grouping of terms in an expression. This affects how an expression is evaluated.
Bitwise operator works on bits and perform bit by bit operation.The following Bitwise operators are supported by Python language:
& - Binary AND
| - Binary OR
^ - Binary XOR
What is an operator?
Simple answer can be given using expression 4 + 5 is equal to 9. Here 4 and 5 are called operands and + is called operator.
Python Variable Naming Rules:
1.Must begin with a letter (a - z, A - B) or underscore (_).
2.Other characters can be letters, numbers or _ only.
3.Variable names are Case Sensitive.