Skip to content

Commit 235a870

Browse files
Update ascii_to_char.py
Added docstring as requested
1 parent 5ef880f commit 235a870

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

conversions/ascii_to_char.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
"""
2+
This script converts an ASCII value to its corresponding character.
3+
Example:
4+
Input: 65
5+
Output: A
6+
"""
17
def ascii_to_char(ascii_val: int) -> str:
28
"""Convert ASCII value to corresponding character."""
39
return chr(ascii_val)

0 commit comments

Comments
 (0)