色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

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怎么合并運行條