Python Features
Python is
general purpose programming language
Object Oriented programming language
also called as Interpreted language
Invented in the Netherlands, in February 1991
developed by Guido van Rossum
It was named after famous BBS comedy show namely “Monty Python’s Flying Circus”
Reserve word of the python interpreter which can’t be used as identifier.
L-value and R-Value
An lvalue (locator value) represents an object that occupies some identifiable
location in memory (i.e. has an address). rvalues are defined by exclusion. Every
expression is either an lvalue or an rvalue, so, an rvalue is an expression that does not
represent an object occupying some identifiable location in memory.
(a) A left value or l-value is an assignable object. It is any expression that may occur on
the leftside of an assignment. Variables are obvious l-values, but so are items in lists.
(b) A right value or r-value is any expression that has a value that may appear on the
right of an assignment. In python, everything is an r-value.
(c) Traditionally, the underscore ( ) is used as a place-holder for an l-value when we
don't care about the result of the assignment.
(d) In assignment, a tuple of l-values is, itself an l-value:
>>> (a,b,c) = (1,2,3)
>>> a,b,c = 1,2,3
>>> (a,b),_,c = (1,2,),9,3
Each of these effectively assigns a=1, b=2, and c=3.