To read from a file in Python, you would use syntax similar to the following:
```
filename = ‘path_to_your_file/filename.extension’
Here is how you can write to a file:
```
filename = ‘path_to_your_file/filename.extension’
Note:
1. Write operation ‘w’ overwrites the existing file content. Using ‘a’ mode to append content to an existing file.
1. Always remember to close your files when you’re done with using `with open()` method which automatically takes care of closing.
1. Using `with open()` method is preferred as it effectively handles resource leaks and makes your code cleaner.