here is my broken code help needed
>Solution :
Two things:
- You are checking for type, but you are reading only characters from a string. Therefore, they are always strings. Instead, use
k.isdigit()
which should return True or False. - j does not exist (did you mean k?)