I'm trying to write a program that user input a random text, and it will print out if it has lower letter, upper letter and/or numbers. When ever i try to input a combination of numbers and letter it won't print. Could someone help me with it?
string = input("write something here: ")
if string.isalpha() and not string.isupper():
print("Has letter")
if string.isupper():
print("Has only upper letters")
if string.islower():
print("Has only lower letters")
if string.isdigit():
print("Has numbers")
if string.isalpha() and string.isdigit():
print("Has numbers and letters")