a, b, c, d, e....
September 2017
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
About
This site is an effort to share some of the base knowledge I have gathered through all this years working with Linux, FreeBSD, OpenBSD, Python or Zope, among others. So, take a look around and I hope you will find the contents useful.
Recent Entries
Recent Comments
Recent Trackbacks
Categories
OpenBSD (9 items)
BSD (0 items)
FreeBSD (19 items)
Linux (3 items)
Security (3 items)
Python (22 items)
Zope (13 items)
Daily (144 items)
e-shell (9 items)
Hacks (14 items)
PostgreSQL (3 items)
OSX (8 items)
Nintendo DS (0 items)
enlightenment (0 items)
Apache (3 items)
Nintendo Wii (1 items)
Django (24 items)
Music (12 items)
Plone (7 items)
Varnish (0 items)
Lugo (2 items)
Sendmail (0 items)
europython (7 items)
Cherokee (1 items)
self (1 items)
Nature (1 items)
Hiking (0 items)
uwsgi (0 items)
nginx (0 items)
cycling (9 items)
Networking (1 items)
DNS (0 items)
Archives

Syndicate this site (XML)

RSS/RDF 0.91

23 noviembre
2007

a, b, c, d, e....

or how to get all the letter from the alphabet...

Hey, that's Python, it is easy!

[albaricoque] ~> python
Python 2.5.1 (r251:54863, Jul 30 2007, 20:56:08)
[GCC 3.4.6 [FreeBSD] 20060305] on freebsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> import string
>>> string.lowercase
'abcdefghijklmnopqrstuvwxyz'
>>>

Just import the string module and call the proper method and et voilá!, you are done.

QUICK UPDATE: from betabug do not import the whole string method, instead, import just the lowercase method:

[albaricoque] ~> python
Python 2.5.1 (r251:54863, Jul 30 2007, 20:56:08)
[GCC 3.4.6 [FreeBSD] 20060305] on freebsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> from string import lowercase
>>> lowercase
'abcdefghijklmnopqrstuvwxyz'
>>>

Why? read that to learn more about the reasons.

Posted by wu at 17:02 | Comments (0) | Trackbacks (0)
<< SQL | Main | 00011100 >>
Comments
There are no comments.
Trackbacks
Please send trackback to:http://blog.e-shell.org/19/tbping
There are no trackbacks.
Post a comment