+ 1
Why is it giving no output
letter ="qwertpoiuyasdfglkjhzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM" msg = "jagwuwbs72628+2-#:" ans = "" for x in msg: if x in letter: ans + x continue print(ans)
3 Answers
+ 3
ans = "" You print an empty string.
Make it ans = ans + x
And what is the continue supposed to do?
+ 3
Thanks
+ 2
It had a reason.
But not now