[ create a new paste ] login | about

Link: http://codepad.org/9VAy9KF1    [ raw code | fork ]

bot42 - Plain Text, pasted on Oct 5:
Python 2.7.3 |EPD_free 7.3-2 (32-bit)| (default, Apr 12 2012, 14:30:37) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> # this is a comment , you can write gibberish here lyk de@#$@D@#R@DF^^
>>> #no error is generated for comments as this is never compiled
>>> a=4
>>> a
4
>>> A

Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    A
NameError: name 'A' is not defined
>>> print 'therefore python is case sensitive'
therefore python is case sensitive
>>> # ill show you one more thing
>>> a1=1
>>> a1
1
>>> # but
>>> 1a=1
SyntaxError: invalid syntax
>>> # gives error because variable names cant bgin wid a number
>>> x,y=1,2
>>> print x,y
1 2
>>> print y,x
2 1
>>> print x,y,x,y,x,y
1 2 1 2 1 2
>>> # the swap
>>> x,y=y,x
>>> print 'the x is ', x
the x is  2
>>> print 'the y is ', y
the y is  1
>>> if 1:
	print 'its true'
else:
	print 'you lied'

its true
>>> 


Create a new paste based on this one


Comments: