def non_string_collection(x):
'''
A simple helper to allow string types to be
distinguished from other collection types.
'''
if isinstance(x, Container):
if not isinstance(x, (str, bytes)):
return True
return False
评论列表
文章目录