So lets say I\'m using Python\'s ftplib to retrieve a list of log files from an FTP server. How would I parse that list of files to get just the file names (the last column) ins
I believe it should work for you.
file_name_list = [' '.join(each_file.split()).split()[-1] for each_file_detail in file_list_from_log]
NOTES -
Here I am making a assumption that you want the data in the program (as list), not on console.
each_file_detail is each line that is being produced by the program.
' '.join(each_file.split())
To replace multiple spaces by 1 space.