Like the articles? Buy the book! Dead Simple Python by Jason C. McDonald is available from No Starch Press.
For me, any project doesn't start f...
For further actions, you may consider blocking this person and/or reporting abuse
Nice and detailed article. I saw a typo that might be worth to fix. When you write about
readline()
, the section title isreadlines()
. So there are two sections calledreadlines()
.Thanks for the post!
Good catch! Fixing that now. Thanks.
Would love to see the rest of the planned series! I'm sure 2020 has thrown your scheduling off. But I am really enjoying your teaching style and humor!
Heheh, there's more coming, I promise! 2020 has indeed thrown me off, and I've been catching up on the book itself (which is 3/5 done). The latest plan is on the first post in the series.
Excited to hear that! I tried my hand at teaching Python, but took the approach of teaching someone who doesn't know programming at all. So it's much more simple.
Hope all is well! Thank you for continuing to chip away at this series.
Please mention operator / in pathlib too.
Also, read_text() which is very convenient.
Thanks for the suggestions. The book will go into more depth than I can explore in the article, and I'll be sure to include these in that!
In the bulletpoint "You must remember to close any file you open. You can do so manually with
open()
, or...", I think you meanclose()
right?Nice and to the point
In your examples of writelines(), you pass a list containing a single string element, but in practice, isn’t the usefulness of writelines() in passing several individual lines in a list?
Hmm, I appear to be doing exactly that? I'm not sure what you mean.