Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 38)
38.
How can you print the ASCII values of all characters in a string?
for char in string: print(ord(char))
ascii_print(string)
print(ascii_values(string))
print(ascii(string))
Answer: Option
Explanation:
To print the ASCII values of all characters in a string, use a loop to iterate through each character and print its ASCII value using ord().
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.