Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Jan 19th, 2019
80
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.20 KB
| None
|
0
0
raw
download
clone
embed
print
report
text = 'ABAABA'
d = {}
for b in text:
d[b] = d.get(b, 0) + 1
print(d)
{'A': 4, 'B': 2}
a = ["A","A","A","B","A","B"]
b = set(a)
c = {i:0 for i in b}
for i in b:
c[i] = a.count(i)
print(c)
Add Comment
Please,
Sign In
to add comment
Public Pastes
Crypto Exchange Binance Secures Full VASP Lic...
PHP | 4 min ago | 0.08 KB
Untitled
C# | 11 min ago | 22.13 KB
Untitled
PHP | 17 min ago | 0.97 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 🤑
GetText | 56 min ago | 0.39 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 🤑
GetText | 60 min ago | 0.38 KB
cloneRecord
JavaScript | 1 hour ago | 0.83 KB
Untitled
PHP | 2 hours ago | 5.65 KB
Soccer Prediction Betting Tips 19042024
PHP | 2 hours ago | 0.07 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!