fromftplibimportFTP# 步骤 1: 连接FTP服务器ftp=FTP('ftp.example.com')# 步骤 2: 登录FTP服务器ftp.login('username','password')# 步骤 3: 切换到目标目录ftp.cwd('/path/to/directory')# 步骤 4: 获取目录下所有文件files=ftp.nlst()# 步骤 5: 筛选出压缩文件compressed_files=[fileforfileinfilesi...