文章分类 -  Python 相关

摘要:安装 wget --no-check-certificate https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2020.07-Linux-x86_64.sh # 如果以前安装过了,加一个 -u 设置为更新 bash An 阅读全文
posted @ 2023-04-10 15:50 klvchen 阅读(102) 评论(0) 推荐(0)
摘要:检查列表中是否有重复元素 使用 set() 函数来移除所有重复元素 def all_unique(lst): return len(lst) == len(set(lst)) x = [1, 1, 2, 2, 3, 2, 3, 4, 5, 6] y = [1, 2, 3, 4, 5, 6] prin 阅读全文
posted @ 2020-12-05 11:59 klvchen 阅读(13) 评论(0) 推荐(0)