I have a .txt and i want a python script to do something with it.
My .txt looks something like this:
- 27b23815-4cbb-dfae-3e6d-38f67ec4266e
- 81a090bd-8973-bc37-5c7b-dc1a18e8ddee
- 7e1bf596-88bc-d8fd-9aea-278d5c689eaa
- 0b365fb0-dea4-53a1-fd27-6cbf9721602c
- 1c317dcf-73f4-edf5-b6a1-ad663d2b507e
- 6db8342d-1afb-2777-1a7f-a5daad06d2db
And i want to delete the first line of the .txt if there is something writen in the 6th line but all without making a new .txt out of the old. Can't quite get the hang of this :(
I know i can delete the first Line with:
lines = file(idpath, "r").readlines()
del lines[0]
file(idpath,"w").writelines(lines)
Would be gratefull for any help