0

Please what's the problem with my code

i want to raise an exception when the user does not type the first word as 'k'or'K' print("enter name\n") a=input("name:") if a[0]!="k" or a[0]!="K": raise ValueError("invalid name") else: print(a) but this code isn't working, it always raises an error. Please help!

4th Apr 2020, 8:45 AM
LORD PEIN
LORD PEIN - avatar
1 Answer