I have a separate system that is exporting to AVExprt.txt. In that export it has TIME combined (no space) AM/PM. How can I exclude the AM/PM from the time?
def main():
import linecache
filename='AVExprt.txt'
appendfile='AVExprt_Main.txt'
date=linecache.getline(filename,2)
remove_lines= 5
with open(filename,'r') as file_object:
lines = file_object.readlines()
for i in range(remove_lines):
del lines[0]
with open(appendfile,'a') as file_object:
for line in lines:
line = date.rstrip() + "," + line
file_object.write(line)
if __name__== "__main__":
main()