TristanSld

for loop in lists 3

Feb 21st, 2014
60
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. #-*-coding:utf-8-*-
  3.  
  4. a = [1,3,8,-2,9,-5]
  5. b = []
  6.  
  7. for x in a: b.append(x*x)
  8. print b
RAW Paste Data