Reading a file in Python involves several steps:

1. **Open the file**: Use the `open()` function to open the file in read mode (`'r'`). This will create a file object that can be used to read the contents of the file.
2. **Read the file contents**: Use the `read()` method to read the entire contents of the file into a string.
3. **Close the file**: Once you're done reading the file, close the file object using the `close()` method.

Here's an example of how you can read a file in Python:
```python
with open('example.txt', 'r') as f:
    contents = f.read()
print(contents)
```
This code opens the file `example.txt` in read mode (`'r'`), reads the contents of the file into a string using the `read()` method, and then closes the file object using the `close()` method.

**Reading a file line by line**

You can also read a file line by line using the `readlines()` method:
```python
with open('example.txt', 'r') as f:
    lines = f.readlines()
for line in lines:
    print(line)
```
This code opens the file `example.txt` in read mode (`'r'`), reads the contents of the file into