Find us on Google+ Kill the code: Loops in PYTHON

Saturday, 1 September 2012

Loops in PYTHON

>>> x=0
>>> i=0
>>> a=['a','b','c','d']
>>> for x in a:
    print(x)

   
a
b
c
d






>>> while i < 10:
    print(i)
    i+=1

   
0
1
2
3
4
5
6
7
8
9

No comments:

Post a Comment