for ip in ips:
ftp = ftplib.FTP(ip)
ftp.login(username, passwd)
Please help me loop between a few ftp locations to retrieve files from them.
for ip in ips:
ftp = ftplib.FTP(ip)
ftp.login(username, passwd)
Please help me loop between a few ftp locations to retrieve files from them.
You have not provided any error or output. What exactly is your problem. There is a lot of working solutions like: https://stackoverflow.com/a/31342420/1012759 or https://unix.stackexchange.com/questions/88710/ftp-bulk-download-and-rename .
Just write a function and then pass the arguments to it in for loop.