Re: computing with characters
- From: "SL" <ni@xxxxxxx>
- Date: Wed, 30 Apr 2008 10:06:12 +0200
"Arnaud Delobelle" <arnodel@xxxxxxxxxxxxxx> schreef in bericht news:m2d4o7bwmd.fsf@xxxxxxxxxxxxxxxxx
"Gabriel Genellina" <gagsl-py2@xxxxxxxxxxxx> writes:
En Wed, 30 Apr 2008 04:19:22 -0300, SL <ni@xxxxxxx> escribió:
"Lutz Horn" <lutz.georg.horn@xxxxxxxxxxxxxx> schreef in bericht
news:mailman.360.1209537877.12834.python-list@xxxxxxxxxxxxx
So just for completion, the solution is:
'b'chr(ord('a') + 1)
thanks :) I'm a beginner and I was expecting this to be a member of
string so I couldnt find it anywhere in the docs.
And that's a very reasonable place to search; I think chr and ord are
builtin functions (and not str methods) just by an historical
accident. (Or is there any other reason? what's wrong with "a".ord()
or str.from_ordinal(65))?
Not a reason, but doesn't ord() word with unicode as well?
yes it does, I just read the documentation on it :)
--
Arnaud
.
- References:
- computing with characters
- From: SL
- Re: computing with characters
- From: Lutz Horn
- Re: computing with characters
- From: SL
- Re: computing with characters
- From: Gabriel Genellina
- Re: computing with characters
- From: Arnaud Delobelle
- computing with characters
- Prev by Date: Re: computing with characters
- Next by Date: Re: Simple TK Question - refreshing the canvas when not in focus
- Previous by thread: Re: computing with characters
- Next by thread: Re: computing with characters
- Index(es):
Relevant Pages
|
|