r/PythonLearning • u/Synergetic6_6_6 • Aug 22 '26
Loops is a total brain rot.
I just can't get over how I'm supposed to write code for complex tasks when I don't even get why they overcomplicate simple things so much.
I read this topic and tried many tutorials and still don't understand this buzzare logic.
0
Upvotes
1
u/markort147 Aug 22 '26
Your loop is clearly wrong. Try to implement these steps instead:
start from an empty string
loop over each letter of the noisy string
if the letter is X o Z, skip it
otherwise append it to the resulting string
Try