DrZhang To check whether a set like small_data is a subset of another, like big_data, we code small_data, then .issubset(), with big_data between parentheses. >>> big_data = {1,2,3,4,5} >>> small_data = {1,5} >>> small_data.issubset(big_data) True
DrZhang 要检查像 small_data 这样的集合是否是另一个集合(如 big_data)的子集,我们可以先编码 small_data,然后使用 .issubset() 方法,括号中放入 big_data。