Advertisement
TristanSld

for loop in lists 1

Feb 21st, 2014
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.09 KB | None | 0 0
  1. #!/usr/bin/env python
  2. #-*-coding:utf-8-*-
  3.  
  4. a = [1,3,8,-2,9,-5]
  5. b = [x*x for x in a]
  6. print b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement