在Python IDLE 3.5.0 shell中工作.根据我对内置"过滤器"函数的理解,它会返回列表,元组或字符串,具体取决于您传入的内容.那么,为什么下面的第一个分配工作,而不是第二个('>>>只是交互式Python提示)
>>> def greetings():
return "hello"
>>> hesaid = greetings()
>>> print(hesaid)
hello
>>>
>>> shesaid = filter(greetings(), ["hello", "goodbye"])
>>> print(shesaid)
<filter object at 0x02B8E410>
Run Code Online (Sandbox Code Playgroud) 我正在编写一个python脚本,使用boto将文件上传到s3.我想只上传已更改的文件,我可以通过它的最后修改日期时间来检查.但我找不到api来获取boto API中的最后修改.