Hello, I’d be grateful if someone could explain the difference between defining a function and simply writing a for loop.
This is my answer:
love_maybe_lines_stripped =  for lines in love_maybe_lines: love_maybe_lines_stripped.append(lines.strip())
I didn’t think to use a function. How am I supposed to know when to write a function and when to just write a for loop?
Also, I initially wrote the code with the empty list inside the loop, but it didn’t work. Why does the empty list have to be outside of the loop?
Sorry for the long post. Thanks in advance.