Advertisement
rfmonk

operator_inplace.py

Jan 16th, 2014
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3.  
  4. from operator import *
  5.  
  6. a = -1
  7. b = 5.0
  8. c = [1, 2, 3]
  9. d = ['a', 'b', 'c']
  10. print 'a =', a
  11. print 'b =', b
  12. print 'c =', c
  13. print 'd =', d
  14. print
  15.  
  16. a = iadd(a, b)
  17. print 'a = iadd(a, b) =>', a
  18. print
  19.  
  20. c = iconcat(c, d)
  21. print 'c = iconcat(c, d) =>', c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement