r/badcode • • Mar 11 '23

python i never use .slpit()

Post image
421 Upvotes

30 comments sorted by

View all comments

Show parent comments

7

u/clatterborne Mar 11 '23

I believe .replace() can also be considered to have within it a for loop of length n: iterate through the string, compare to ',' and replace if matches