Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

letter frequency counter python

text = input()
dict = {}
lis = [] 
for ch in text: 
    lis += [f"{ch}"] 
    dict[f"{ch}"] = lis.count(ch) 
print(dict)
Comment

PREVIOUS NEXT
Code Example
Python :: sin and cos in python 
Python :: accuracy score 
Python :: pandas replace zero with blank 
Python :: python read requests response 
Python :: decode html python 
Python :: draw a circle in python turtle 
Python :: how to import .csv file in python 
Python :: python difference between consecutive element in list 
Python :: create a list of characters python 
Python :: find index of pandas column 
Python :: django dumpdata 
Python :: tkinter hello world 
Python :: how to fill nan values with mean in pandas 
Python :: python filter list of dictionaries by value 
Python :: decrease hours in datetime python 
Python :: python post request 
Python :: flask mail 
Python :: set python 3 as default ubuntu 
Python :: drop nulll python 
Python :: pyspark datetime add hours 
Python :: star operator python 
Python :: python program running time 
Python :: python make a list of odd numbers 
Python :: download a file from url python 
Python :: create python file kali linux 
Python :: move the mouse in games python 
Python :: python program to print prime numbers in an interval 
Python :: python get path of current file 
Python :: python day of the week 
Python :: python find index of minimum in list 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =