473,387 Members | 1,291 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

chrtohex

Hello again my friends

here's my new problem.

How i can translate chr in to hex or int to integer value?

Best Regards

Luca

Feb 24 '06 #1
3 1149
luca72 wrote:
Hello again my friends

here's my new problem.

How i can translate chr in to hex or int to integer value?


print "%x" % ord('a')

Diez
Feb 24 '06 #2
Or:
py> print hex(ord('a'))
0x61
py> print int(ord('a'))
97

Feb 24 '06 #3
luca72 wrote:
Hello again my friends

here's my new problem.

How i can translate chr in to hex or int to integer value?

Best Regards

Luca

By demonstrating that you have tried to solve the problem yourself.
See:
http://www.catb.org/~esr/faqs/smart-questions.html

--Scott David Daniels
sc***********@acm.org
Feb 24 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.