I wonder how you are able to run this program, seems to be some harry potter stuff. For me its typo in this line "ele" == input("")
and gives Syntax error . So just fix this with ele = input()
and replace “ele” with ele in all if/elif checks i.e if ele == "H":
it will work as intended.
solved Python if/else/elif always goes to else [closed]