Q: Problem with opening file with Path.home() in Python I'm having a recurrent problem with trying to open a file. This is my code:
C:\\Users\\Davis\\Pycharm\\python_exercises = Path.home() / "practice_files" / "dog_breeds.pdf"

Which keeps throwing me an error: 

SyntaxError: unexpected character after line continuation character.

I don't understand where this comes from and what to do about it... 

A: Your code doesn't really make sense...
Path.home() should equate to the home path on your machine i.e. C:\Users\Davis
If you need to open a file from the home directory you could do something like...
with open(Path.home(), 'r') as file:
    # do file operations here

If you need to go down the directory tree to a specific file path you can use the Path() function and open the file accordingly:
# file_path = C:\Users\Davis\some\file\path
file_path = Path(Path.home(), 'some', 'file', 'path')

with open(file_path, 'r') as file:
    # file operations here

This is a really good article on understanding how file paths work in python: https://automatetheboringstuff.com/2e/chapter9/
