欧美一区二区三区,国内熟女精品熟女A片视频小说,日本av网,小鲜肉男男GAY做受XXX网站

python怎么合并運行條

劉柏宏2年前17瀏覽0評論

python怎么合并運行條?

# read data from file

with open("data_src.txt", 'rt') as src:

data = [ln.strip() for ln in src]

# distinct data and write to file with ', ' join

with open("data_sto.txt", 'wt') as sto:

sto.write(', '.join(list(set(data)))) python 中 set 是 “unordered collection of unique elements” 可以自動實現剔除重復數據。

list拼接 java,python怎么合并運行條