python 3.x - How to convert a string array to its ASCII equivalent? -
i'm couple of weeks in gsce computer science coursework , lots of people have been stuck on how convert string array ascii equivalent.
i using code:
c = input("enter character: ") print ("the ascii vlaue of '" +c+ "' ",ord(c))
but doesn't work entire string.
so i'm asking how convert string array equivalent ascii code?
i guess search find answer, advice first.
you use this:
r = [ord(c) c in s]
and can (course)work there
hth, edwin.
Comments
Post a Comment