Mensanator [EMAIL PROTECTED] wrote:
On May 30, 10:03???am, Philipp Pagel [EMAIL PROTECTED]
wrote:
'P' is obviously not an ASCII representation of a number.
It is in base 36.
Sure, but if that was the OP's intent he would most likely have
mentioned it...
As others have already guessed, it's
YOU SHOULD REMOVE or CORRECT YOUR POST here:
http://mail.python.org/pipermail/python-list/2007-February/427841.html
It is not true - eg. try :
a='P'# P is ASCII , isn't it ?
b=int(a)
and what you will get ? An error !!!
Or probably you yourself should - quote :
You probably
In article [EMAIL PROTECTED],
Skonieczny, Chris [EMAIL PROTECTED] wrote:
YOU SHOULD REMOVE or CORRECT YOUR POST here:
http://mail.python.org/pipermail/python-list/2007-February/427841.html
Why? There's nothing wrong there.
It is not true - eg. try :
a='P'# P is ASCII ,
Skonieczny, Chris [EMAIL PROTECTED] wrote:
YOU SHOULD REMOVE or CORRECT YOUR POST here:
http://mail.python.org/pipermail/python-list/2007-February/427841.html
It is not true - eg. try :
a='P'# P is ASCII , isn't it ?
b=int(a)
and what you will get ? An error !!!
'P' is
On May 30, 10:03�am, Philipp Pagel [EMAIL PROTECTED]
wrote:
Skonieczny, Chris [EMAIL PROTECTED] wrote:
YOU SHOULD REMOVE or CORRECT YOUR POST here:
http://mail.python.org/pipermail/python-list/2007-February/427841.html�
It is not true - eg. try :
a='P' � � � � � �# P is ASCII , isn't it ?
Skonieczny, Chris wrote:
YOU SHOULD REMOVE or CORRECT YOUR POST here:
http://mail.python.org/pipermail/python-list/2007-February/427841.html
It is not true - eg. try :
a='P'# P is ASCII , isn't it ?
b=int(a)
and what you will get ? An error !!!
Or probably you yourself
On May 30, 6:44 pm, Joshua Kugler [EMAIL PROTECTED] wrote:
Skonieczny, Chris wrote:
YOU SHOULD REMOVE or CORRECT YOUR POST here:
http://mail.python.org/pipermail/python-list/2007-February/427841.html
It is not true - eg. try :
a='P' # P is ASCII , isn't it ?
b=int(a)
and
On May 30, 7:59 pm, Mensanator [EMAIL PROTECTED] wrote:
On May 30, 6:44 pm, Joshua Kugler [EMAIL PROTECTED] wrote:
Skonieczny, Chris wrote:
YOU SHOULD REMOVE or CORRECT YOUR POST here:
http://mail.python.org/pipermail/python-list/2007-February/427841.html
It is not true - eg. try
Is there any built in function that converts ASCII to integer or vice versa
in Python?
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
John wrote:
Is there any built in function that converts ASCII to integer or vice versa
in Python?
Thanks!
You probably should go through the tutorial ASAP that is located here:
http://docs.python.org/tut/
Convert ascii string to integer:
a='1'
b=int(a)
Convert integer to ascii
On Feb 22, 5:43 pm, John [EMAIL PROTECTED] wrote:
Is there any built in function that converts ASCII to integer or vice versa
in Python?
Thanks!
Try int.
ie.
try:
int_val = int(str_val)
except ValueError:
# conversion failed
Keir.
--
Keir Robinson
Sometimes a scream is better than a
John wrote:
Is there any built in function that converts ASCII to integer or vice
versa in Python?
Thanks!
int('10')
10
str(10)
'10'
--
http://mail.python.org/mailman/listinfo/python-list
Or perhaps...
ord (a)
97
chr (97)
'a'
On 2/22/07, hg [EMAIL PROTECTED] wrote:
John wrote:
Is there any built in function that converts ASCII to integer or vice
versa in Python?
Thanks!
int('10')
10
str(10)
'10'
--
http://mail.python.org/mailman/listinfo/python-list
--
I just found ord(c), which convert ascii to integer.
Anybody know what the reverse is?
John [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Is there any built in function that converts ASCII to integer or vice
versa
in Python?
Thanks!
--
John [EMAIL PROTECTED] writes:
I just found ord(c), which convert ascii to integer.
Anybody know what the reverse is?
The inverse of ord is chr:
% python
Python 2.5 (r25:51908, Jan 5 2007, 00:12:45)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type help, copyright,
John wrote:
I just found ord(c), which convert ascii to integer.
Anybody know what the reverse is?
John [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Is there any built in function that converts ASCII to integer or vice
versa
in Python?
Thanks!
The phrasing of your
John [EMAIL PROTECTED] writes:
I just found ord(c), which convert ascii to integer.
Anybody know what the reverse is?
chr(i)
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 22, 6:35 pm, Lloyd Zusman [EMAIL PROTECTED] wrote:
John [EMAIL PROTECTED] writes:
I just found ord(c), which convert ascii to integer.
Anybody know what the reverse is?
The inverse of ord is chr:
% python
Python 2.5 (r25:51908, Jan 5 2007, 00:12:45)
[GCC 3.2.2 20030222
On Feb 23, 5:23 am, John [EMAIL PROTECTED] wrote:
I just found ord(c), which convert ascii to integer.
ord('\xff') - 255
ord(unichr(666)) - 666
What ascii?
What is stopping you from reading the documentation section on built-
in functions (http://docs.python.org/lib/built-in-funcs.html)?
That
yours and that of others trying to guess
Some people spend many buck bying guessing games ... be nice !
hg
--
http://mail.python.org/mailman/listinfo/python-list
20 matches
Mail list logo