check whether the given input is alphabet, number or alphanumeric in python

Question: - Check the input is alphanumeric, alpha or numeric with the help of function and without function in Python?







write a program which takes input from the user and after taking the input from the user check it that it is alphanumeric( having both alphabets and numbers) , alpha( having only alphabets) or numeric(having only numbers)
so we have to first take input from the user with the help of input function and after that it can be check in both ways so firstly we solve this problem with the help of creating a function after that we will solve same problem without defining the function.
Lets see the code for check input is alphanumeric, alha or numeric: -



without defining the function : -



Related Questions: -
How do I use Isnumeric in Python?
What is the difference between Isdigit and Isnumeric Python?
What is Isalnum in Python?
How do you use Isalpha in Python?
check whether a character is alphabet or not in python
write a program to check whether the given input is alphabet, number or special character in python
How do you check if a string contains only alphabets and numbers in Python?
How do you check whether a character is alphabet or not in Python?

How do you check if a string contains all alphabets in Python?

Comments

Popular posts from this blog

Programmingshark index 6

Proassignmenthelp index 12

Proassignmenthelp index 27