String to list conversion (3)

Now, we have another approach to print the basename of a filename:

# print the basename of a filename
import string
fileName="data.col"
print string.split(fileName,".")[0]

prints:

data