1、数组去重的方法
lst=[1,3,5,3,4,4,2,9,6,7]
set_lst=set(lst)

参考:https://blog.csdn.net/weixin_44520259/article/details/89764254

 

2、统计数组 or 元组 里面字符的重复次数

2020 python笔记

 参考: https://blog.csdn.net/weixin_44520259/article/details/89764254

 

3\

for i,r in [(1,2)]:
print i,r

 

4、写入json文件

with open("../config/record.json","w") as f:
2     json.dump(new_dict,f)
3     print("加载入文件完成...")

相关文章:

  • 2021-12-27
  • 2021-08-23
  • 2021-07-07
  • 2021-12-30
  • 2021-06-05
  • 2021-12-18
  • 2021-10-15
  • 2021-07-11
猜你喜欢
  • 2021-06-26
  • 2022-02-02
  • 2021-08-23
  • 2021-08-30
  • 2021-11-30
  • 2021-12-02
  • 2021-12-05
相关资源
相似解决方案