Answer:
Here is one possible way to do that:
```python
import os.path
# check if the file exists
if os.path.isfile("textfile.txt"):
# open the file in read mode
with open("textfile.txt", "r") as f:
# read and print the first line
first_line = f.readline()
print(first_line)
else:
# print an error message
print("The file does not exist.")
```