You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
308 B
Python
17 lines
308 B
Python
import os
|
|
|
|
path = (os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
f = open(path + "/var.txt", "r")
|
|
|
|
g = open(path + "/newvars.txt", "w+")
|
|
|
|
for line in f:
|
|
shortline = line[45:-14]
|
|
preserve = int((len(shortline) - 1)/2)
|
|
newline = shortline[:preserve]
|
|
g.write(newline + "\n")
|
|
|
|
f.close()
|
|
g.close()
|