Thursday 26 December 2013

Variables and Literal constants Example.

$ python

>>> i = 5
>>> print i
5
>>> i = i + 1
>>> print i
6
>>> w1 = "This is a string with double quote."
>>> print w1
This is string with double quote.
>>> w2 = 'This is a string with single quote.'
>>> print w2
This is a string with single quote.
>>> w3 = ''' This is
... a string
... with multiline.'''
>>> print w3
This is
a string
with multiline.

No comments:

Post a Comment