ASCII conversion in Python -


i making encryption program easy make if use ascii numbers represent character.(using deprecated string.translate) there way pass character through ascii number , append string?

i think you're looking chr:

return string of 1 character ascii code integer i. example, chr(97) returns string 'a'. inverse of ord(). argument must in range [0..255], inclusive; valueerror raised if outside range. see unichr().

and ord:

given string of length one, return integer representing unicode code point of character when argument unicode object, or value of byte when argument 8-bit string.

example:

print("somestring" + chr(65)) # prints "somestringa" 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -