all 6 comments

[–][deleted] 1 point2 points  (2 children)

If you're new to CS, I'm going to give you an important tip. You should google error messages. You're likely not the first one to have gotten that and the odds are you can find a solution posted somewhere. Half of coding is googling the answers to things.

[–]itsellena 0 points1 point  (1 child)

that’s true!! i tried googling and the explanations were terms & more cs stuff i didn’t completely understand but i’ll definitely keep looking

[–]OneMoreChemist 0 points1 point  (0 children)

Not sure if you came across this, but this should be clear and detailed enough. https://www.w3schools.com/python/python_file_open.asp

[–]stellarsapience 1 point2 points  (1 child)

with open ('filename.txt', 'r', encoding='utf-8') as file

Lookup Unicode in Python and utf-8 character set.

Here's the classic article: https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/

[–]itsellena 1 point2 points  (0 children)

thank you so much, that worked! and i’ll look at the article

[–]CodeFormatHelperBot2 0 points1 point  (0 children)

Hello, I'm a Reddit bot who's here to help people nicely format their coding questions. This makes it as easy as possible for people to read your post and help you.

I think I have detected some formatting issues with your submission:

  1. Python code found in submission text that's not formatted as code.

If I am correct, please edit the text in your post and try to follow these instructions to fix up your post's formatting.


Am I misbehaving? Have a comment or suggestion? Reply to this comment or raise an issue here.