Am new to Python and using FTPLib for some reason.
My aim is, am having a server where files with .txt will be stored by different clients very frequently. With nlst() function I could get the files present in the FTP server. But it returns all the files. Since the server has hell lot of files the response time is slow.
Is there any way to get the first twenty elements from the FTP using some function and then next twenty? This way I could improve the response time from FTP server considerably.
Regards
No there's no standard way to retrieve directory listing by parts in FTP protocol.

Some FTP servers do support wildcards in the listing commands (NLST and alike). So you could get first all file starting with a, then with b, etc. But you have to test this specifically with your server, as it is a non-standard behavior.
Python ftplib: Getting number of files from FTP