basically i need to get a variable as a user input (ch) that can only contain capitalized letters and numbers in form of a string of course . i tried to capitalize the input of the user even if he gave them in a lowercase format which worked fine but now i have to make sure he didn't use any signs (like what you see in forbidenCh) but my idea did not work pls help me out here you can use any methode you want as long as it accomplish's the purpose of the program and thnx
this is my attempt :
ch=str(input("only give letters and numbers"))
ch= ch.upper()
forbidenCh="!#$%&'()*+,-./:;<=>?@[\]^_`{|}~"
for i in forbidenCh:
for j in ch:
if i == j:
ch=str(input("u didn't put captilized letters and numbers !!"))
ch= ch.upper()
else:
break