求解晰三四五六行,不是很理解

![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/0255125048361

img

img

  • l = input().split() # 输入按空格切分,比如输入"hello world" , 结果就是["hello", "world"]

  • s = set(l) # 将列表转为集合, 集合不能有重复元素, ["hello", "hello"], 结果就是("hello")

  • 然后去判断s, l的长度, 显然, 如果s的长度小于l, 那么就证明l中有重复元素

我的宝,下次可以尝试使用shift +win+s快捷键截屏吗?都2021年了,怎么还在用手机拍电脑屏幕