• Register
1 vote
30 views

Problem:

Can anyone tell me how to get ascii value of char in python. I am newbee so please help.

10 7 2
6,060 points

Please log in or register to answer this question.

1 Answer

1 vote

Answer:

To get ascii value of char in python you can use the code.(Here I did this for the char x)

a = 'x'
print("Your value in ascii'" + a + "' is", ord(a))

And our output will be:

Your value in ascii'x' is 120

you can use this code for any other char to get their ascii values. Happy coding.

11 6 4
34,950 points

Related questions

0 votes
1 answer 13 views
13 views
Problem: How can I get ascii value of char python?
asked Mar 20 Ifra 36.4k points
0 votes
1 answer 3 views
3 views
Problem: How can I get ascii value of char in javascript?
asked Mar 31 zayed1 61.8k points
0 votes
1 answer 20 views
20 views
Problem Can anyone help me how get a char vlue in ascii in c++
asked Apr 6 Subhendu 4.5k points
0 votes
1 answer 17 views
17 views
Problem: Please tell me how java get ascii value of char??
asked Mar 25 Ifra 36.4k points
0 votes
1 answer 71 views
71 views
I need to write a program where I input a character and get Ascii value.
asked Oct 8, 2020 Ahsan 1.8k points
0 votes
1 answer 22 views
22 views
Problem: I want to know how can I get the ascii value of character in C++? Is there any mechanism to do so? If yes, then please elaborate with examples.
asked Oct 21, 2020 Code Learner 9.8k points
0 votes
1 answer 6 views
6 views
Problem: I need help to solve:get ascii value of string c++
asked Apr 11 ashik 14.6k points
0 votes
1 answer 3 views
3 views
Problem: Can anyone te me how to convert ASCII to char in c++?
asked Mar 31 zayed1 61.8k points
0 votes
1 answer 114 views
114 views
Hello house, I would like to know how to solve this Python SyntaxError: Non-ASCII character '\xe2' in file. Thanks
asked Oct 23, 2020 psandprop 2.4k points
0 votes
1 answer 19 views
19 views
Problem Anyone can help me how i convert ascii to char in c++
asked Mar 25 Subhendu 4.5k points