Descripción
Read a text file line by line using a context manager
File Template: ❌
Prefix
file:read
Scopes
python
Snippet de código
with open('$1', 'r') as file:
for line in file:
print(line.strip())
Read a text file line by line using a context manager
file:read
python
with open('$1', 'r') as file:
for line in file:
print(line.strip())