Skip to main content
 首页 » 编程设计

python之列出 : printing number only if its not a duplicate

2025年05月04日16xxx_UU

<分区>

给定一个包含 n 个数字的列表,我如何打印除重复项之外的每个元素?

d = [1,2,3,4,1,2,5,6,7,4] 

例如,我想从这个列表中打印:1,2,3,4,5,6,7