I have files that I want only 'foo' and 'bar' left from split.
dn = "C:\X\Data"
files
f= C:\X\Data\foo.txt
f= C:\X\Dats\bar.txt
I have tried f.split(".",1)[0]
I thought since dn and .txt are pre-defined I could subtract, nope.
Split does not work for me.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…