The retrlines
prints to stdout by default. You can collect the output in a list, however, by using the second (callback) argument like this:
import ftplib
ftp = ftplib.FTP("ladsweb.nascom.nasa.gov")
ftp.login()
ftp.cwd("allData/5/MOD11A1/2012/193/")
filenames = []
ftp.retrlines('NLST', filenames.append)
print(filenames)