Python代码比较两个花名册是否相同
代码如下:
roster1 = ['张三', '李四', '王五', '赵六', '钱七'] roster2 = ['张三', '李四', '王五', '赵六']
print(len(roster1)) print(len(roster2))
if roster1 == roster2: print('相同') else: print('不相同')
原文地址: https://www.cveoy.top/t/topic/nuHR 著作权归作者所有。请勿转载和采集!