FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python/test/algorithm/count_duplicate.py at master · eatyorcode/python · GitHub
eatyorcode
/
python
Public
forked from
zhanghe06/python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python
/
test
/
algorithm
/
count_duplicate.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (14 loc) · 347 Bytes
Breadcrumbs
python
/
test
/
algorithm
/
count_duplicate.py
Copy path
File metadata and controls
21 lines (14 loc) · 347 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: count_duplicate.py
@time: 2017/6/17 下午12:32
@title: 查找集合中重复元素的个数
"""
from
collections
import
Counter
print
Counter
([
1
,
2
,
2
,
2
,
2
,
3
,
3
,
3
,
4
,
4
,
4
,
4
])
# Counter({2: 4, 4: 4, 3: 3, 1: 1})
if
__name__
==
'__main__'
:
pass
Back
|
FazBrowse Home
|
New Git URL