Spaces:
Sleeping
Sleeping
File size: 272 Bytes
9d3162f |
1 2 3 4 5 6 7 8 9 10 11 |
new_rq = ""
with open("requirements_old.txt") as myFile:
pkgs = myFile.read()
pkgs = pkgs.splitlines()
for pkg in pkgs:
print(pkg.split('==')[0])
new_rq += f"{pkg.split('==')[0]}\n"
with open("requirements.txt","w+") as myFile:
myFile.write(new_rq)
|