py3k: converting int to bytes

spam at uce.gov spam at uce.gov
Thu Feb 24 11:19:49 EST 2011


Is there a better way to convert int to bytes then going through strings:

x=5
str(x).encode()


Thanks.

-- 
Yves.                                                  http://www.SollerS.ca/
                                                        http://blog.zioup.org/



More information about the Python-list mailing list