Wednesday, April 3, 2013

Python : Loop through alphabets a to z

To loop through the alphabets a to z and print them, here is a simple script in python


#!/usr/bin/python

import string

alphabets = string.ascii_lowercase

for i in alphabets:
    print i

Output

a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z

No comments:

Post a Comment