用法:
any(iterable)
如果
iterable
的任何元素為真,則返回True
。如果可迭代對象為空,則返回False
。相當於:def any(iterable): for element in iterable: if element: return True return False
相關用法
- Python any()用法及代碼示例
- Python ast.MatchClass用法及代碼示例
- Python abc.ABCMeta用法及代碼示例
- Python ast.ListComp用法及代碼示例
- Python ast.Lambda用法及代碼示例
- Python asyncio.BaseTransport.get_extra_info用法及代碼示例
- Python ast.IfExp用法及代碼示例
- Python unittest assertNotIsInstance()用法及代碼示例
- Python ast.Return用法及代碼示例
- Python Tkinter askopenfile()用法及代碼示例
- Python ast.Subscript用法及代碼示例
- Python asyncio.shield用法及代碼示例
- Python asyncio.run用法及代碼示例
- Python argparse.ArgumentParser.convert_arg_line_to_args用法及代碼示例
- Python unittest assertIsNotNone()用法及代碼示例
- Python unittest assertFalse()用法及代碼示例
- Python asyncio.wait_for用法及代碼示例
- Python abc.abstractmethod用法及代碼示例
- Python asyncio.create_task用法及代碼示例
- Python Tkinter asksaveasfile()用法及代碼示例
注:本文由純淨天空篩選整理自python.org大神的英文原創作品 any。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。