Is there a better way of doing this?
output is "somename.dat.txt"
Also want just the file name without the "dat" extension so output will be:
"somename.txt"
1 2 |
f = open (somename.dat) print ( "{0}" . format (f.name) + ".txt" ) |
Also want just the file name without the "dat" extension so output will be:
"somename.txt"