SyntaxFix
Write A Post
Hire A Developer
Questions
From a file:
import re sep = '...' with open("requirements.txt") as file_in: lines = [] for line in file_in: res = line.split(sep, 1)[0] print(res)