os.path.split("c:\\music\\ap\\mahadeva.mp3") # The split function splits a full pathname and returns a tuple containing the path and filename.
(filepath, filename) = os.path.split("c:\\music\\ap\\mahadeva.mp3")
Reference: http://www.diveintopython.net/file_handling/os_module.html