How to get the ASCII values of a character in python

0 votes
Is there a function for this task in python?
Jul 17, 2019 in Python by Waseem
• 4,540 points
871 views

1 answer to this question.

0 votes
You can get the ASCII value of character by using ord()  build-in function in python, which takes one argument that is character and return the corresponding ASCII value for that character.
answered Aug 23, 2020 by Sajetha Selva

Related Questions In Python

0 votes
1 answer

How to get the position of a character in Python?

There are two string methods for this, find() and index(). ...READ MORE

answered Jan 5 in Python by Gitika
• 65,950 points
124 views
0 votes
1 answer

How to get the size of a string in Python?

If you are talking about the length ...READ MORE

answered Jun 4, 2018 in Python by aryya
• 7,440 points
486 views
+1 vote
1 answer
+1 vote
2 answers

How to print first character of each word in upper case of a string in Python

class Solution:     def firstAlphabet(self, s):             self.s=s              k=''              k=k+s[0]              for i in range(len(s)):                     if ...READ MORE

answered Oct 28, 2020 in Python by Anurag
8,332 views
–1 vote
2 answers

How to find the size of a string in Python?

following way to find length of string  x ...READ MORE

answered Mar 29, 2019 in Python by rajesh
• 1,230 points
571 views
0 votes
2 answers

How can I get the count of a list in Python?

n=[1,2,3,4,5,6,7,8,9] print(len(n)) =9 READ MORE

answered Dec 10, 2020 in Python by anonymous
502 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,400 views
0 votes
0 answers
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,810 points
1,799 views