print "This program converts a sequence of ASCII numbers into"
print "the string of text that it represents."
print
# get the message to encode
instring = raw_input("Please enter the ASCII-encoded messages: ")
#loop through each substring and build ASCII message
message = ""
for numStr in string.split(inString):
asciinum = eval(numstr) # convert digits to a number
message = message + chr(asciinum) # append character to message
With:string.split
instring.split
--
You received this message because you are subscribed to the Google Groups "PyScripter" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pyscripter/-/MnWtFuyvBeIJ.
To post to this group, send email to pyscr...@googlegroups.com.
To unsubscribe from this group, send email to pyscripter+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyscripter?hl=en.