Jun-10-2017, 03:36 PM
Is there a better way of doing this?
Also want just the file name without the "dat" extension so output will be:
"somename.txt"
f = open(somename.dat) print ("{0}" .format(f.name) + ".txt")output is "somename.dat.txt"
Also want just the file name without the "dat" extension so output will be:
"somename.txt"