Python program to print ascii value of character; Through this tutorial, i am going to show you how to print character using ASCII value in Python.
Python Program to Print ASCII Value of Character
- Python program to print ASCII value of a character
- How to print character using ASCII value in python
Python program to print ASCII value of a character
# Program to find the ASCII value of the given character chr = input("Please Enter Character :- ") convert = ord(chr) print("The ASCII value of '" + chr + "' is", convert)
Output:
Please Enter Character :- k k The ASCII value of 'k' is 107
How to print character using ASCII value in python
# Program to find the Character from ASCII value test = input("Please Enter ASCII Value :- ") convertToInt = int(test) convertToAscii = chr(convertToInt) print("The ASCII value of '" + test + "' is", convertToAscii)
Output:
Please Enter ASCII Value :- 65 The ASCII value of '65' is A
Recommended Python Tutorials
Recommended:-Python Program to Add Two Numbers
Recommended:-Python Program to Calculate Simple Interest
Recommended:-Python Remove First & Last Character from String
Recommended:-Python Convert String Lowercase to Uppercase
Recommended:-Python Program to Convert Uppercase to Lowercase
Recommended:-Python Program Find Length of String
Recommended:-Python Concatenate String and Variable (int float)
Recommended:-Python Trim String – rstrip(), lstrip(), strip()
Recommended:-Python Dictionary Methods with Example
Recommended:-Python Reverse String
Recommended:-Python String find() Method
Recommended:-Python Replace Character in String
Recommended:-Python Convert String to Float
Recommended:-Python String translate() Method Example
Recommended:-Python Convert String to List
Recommended:-Python filter() Method
Recommended:-Python Map() Method
Recommended:-Python String Append