Advertisement
Guest User

Untitled

a guest
Jan 28th, 2015
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. a = 1
  2. def inc(x):
  3.     x= x +1
  4.     print x
  5.     return x
  6. if(inc(a)>0) or (inc(10)>0):
  7.     pass
  8. print "--------"
  9. if(inc(a)>0) | (inc(10)>0):
  10.     pass
  11.  
  12. print "--------"
  13. print a
  14. print "--------"
  15.  
  16. class Moja:
  17.     def __init__(self):
  18.         self.i=10
  19.  
  20. def inc2(x):
  21.     x.i=x.i+1
  22.  
  23. y = Moja()
  24. inc2(y)
  25. print y.i
  26.  
  27.  
  28. print "--------"
  29.  
  30.  
  31. def inc3(x):
  32.     x=x+"X"
  33. s = "ASD"
  34. inc3(s)
  35. print s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement