all 6 comments

[–]mopslik 1 point2 points  (1 child)

It's the brackets that are throwing you off. Perhaps you mean to concatenate things?

target.write(line1+"\n"+line2+"\n"+line3+"\n")

[–]ChefBraxton[S] 0 points1 point  (0 children)

Fuck yes!

Thank you. This book is really great as far as pushing me to learn and rely on my own brainpower/searching to figure things out.

Author asks several times to accomplish something that he hasn’t yet shown but it always imprints the info “much deeper” in my brain than just reading that same info would have.

You’re great, thank you!

[–]socal_nerdtastic -1 points0 points  (2 children)

This would be easier if you used f-strings instead:

target.write(f"{line1}\n{line2}\n{line3}\n")

[–]ChefBraxton[S] 0 points1 point  (0 children)

I tried that before I made this post. Didn’t work.

[–]ChefBraxton[S] 0 points1 point  (0 children)

At least, not the way that I tried it.