«

»

Jan 03

To store all the alphabets in a list in python

 

We can store all the alphabets in a list as follows :

import  string
alpha = [i for i  in string.ascii_lowercase]
for i in alpha :
    print i,

 

OUTPUT :

$ python test.py 
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
$ 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Warning: require_once(): open_basedir restriction in effect. File(/home/admin/web/stats.theserverhouse.com/public_html/owa_php.php) is not within the allowed path(s): (/home/admin/web/linuxjoy.in/public_html:/home/admin/tmp) in /home/admin/web/linuxjoy.in/public_html/index.php on line 20

Warning: require_once(/home/admin/web/stats.theserverhouse.com/public_html/owa_php.php): failed to open stream: Operation not permitted in /home/admin/web/linuxjoy.in/public_html/index.php on line 20

Fatal error: require_once(): Failed opening required '/home/admin/web/stats.theserverhouse.com/public_html/owa_php.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/admin/web/linuxjoy.in/public_html/index.php on line 20