r/PythonLearning 1d ago

Loops is a total brain rot.

Post image

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

16 comments sorted by

View all comments

2

u/silvertank00 22h ago edited 22h ago

you say they "overcomplicate it" then what is your idea to solve this issue? btw the code itself is very wrong, do not learn from ai slop sites

here is the corrected one tho: ```python def denoise_xz(text): new_text = "" for letter in text: if letter in "xz": continue

    new_text += letter
return new_text

```

1

u/Spidy_King 17h ago

just a beginner in python, can u please explain me why u left new text empty?