page contents

合并两个列表,并消除重复的值?

轩辕小不懂 发布于 2022-08-05 14:31
阅读 21
收藏 0
分类:Python开发
4011
Nen
Nen
- 程序员

list_1=["CoCo","CiCi","python编程学习圈","520"]


list_2=["520","ITesterA","888",666,"CoCo"]

#!/usr/bin/python3

# -*- coding:utf-8 -*-

# @Time:2021/5/26 14:13

# @Author:CoCo

# @微信公众号:python编程学习圈

# @File:Ex.py

# @Software:PyCharm

list_1=["CoCo","CiCi","python编程学习圈","520"]

list_2=["520","ITesterA","888",666,"CoCo"]

res=set(list_1+list_2)

print(res)

请先 登录 后评论