r/ProgrammerHumor • • 19h ago

Meme technicallyCorrect

Post image
1.0k Upvotes

42 comments sorted by

View all comments

Show parent comment

4

u/radobot 9h ago

It kind of bothers me how the variable result is redundant. You could have just printed each character directly instead of accumulating them in a string.

1

u/zx48 8h ago

Oh yeah, nice optimisation. Would save a bit of memory too 😁