Pal's Web Log
Programming - Linux, Ubuntu, Python, Django, Postgres, HTML, Cloud, Data Science etc.
Labels
Django
Docker
Google Cloud
Linux
Postgres
Python
Friday, November 22, 2013
Control Flow Loops in Python
For Loop to reassign items in a list:
>>> s = [1,2,3]
>>> for n in range(len(s)):
s[n] = s[n]*2
>>> s
[2, 4, 6]
Newer Post
Older Post
Home