Letter, Digit or Special Character
This Program name is Letter, Digit or Special Character. Write a Python program to Letter, Digit or Special Character, it has two test cases
The below link contains Letter, Digit or Special Character question, explanation and test cases
https://drive.google.com/file/d/1iGIZxhoPoL67KNkroEgQpaIo3Vh8w7dE/view?usp=sharing
We need exact output when the code was run
def character_element(n):
import string
if n in string.ascii_letters:
print('Letter')
elif n in string.digits:
print('Digit')
else:
print('Special Character')
Comments
Leave a comment