1) First, install the required libraries.
-pip install Counter
2) Create a file under the name of input in the directory where the python code is located and write the information you want to search there.
Like this:
Code:
Python:
from collections import Counter
fileName = "input.txt"
with open(fileName, encoding='utf-8') as doc:
#count = Counter(doc.read().strip().split())
count = Counter(doc.read().strip().split('\n'))
for key, value in count.most_common(1000):
print(key+ " : " + str(value))
1) First, install the required libraries.
-pip install Counter
2) Create a file under the name of input in the directory where the python code is located and write the information you want to search there.
Like this:
Code:
Python:
from collections import Counter
fileName = "input.txt"
with open(fileName, encoding='utf-8') as doc:
#count = Counter(doc.read().strip().split())
count = Counter(doc.read().strip().split('\n'))
for key, value in count.most_common(1000):
print(key+ " : " + str(value))
taht is something i would need back then in highscool when i pratice my shit,, ,but letz be honest phyton to count work?? even Word.exe could do that now lol why would you need this script at all
1) First, install the required libraries.
-pip install Counter
2) Create a file under the name of input in the directory where the python code is located and write the information you want to search there.
Like this:
Code:
Python:
from collections import Counter
fileName = "input.txt"
with open(fileName, encoding='utf-8') as doc:
#count = Counter(doc.read().strip().split())
count = Counter(doc.read().strip().split('\n'))
for key, value in count.most_common(1000):
print(key+ " : " + str(value))
1) First, install the required libraries.
-pip install Counter
2) Create a file under the name of input in the directory where the python code is located and write the information you want to search there.
Like this:
Code:
Python:
from collections import Counter
fileName = "input.txt"
with open(fileName, encoding='utf-8') as doc:
#count = Counter(doc.read().strip().split())
count = Counter(doc.read().strip().split('\n'))
for key, value in count.most_common(1000):
print(key+ " : " + str(value))
Bro, I have been working on python and javascript for about 4 years. For example, what kind of script do you want?
Like this ?
Python:
from pynput.keyboard import Key, Controller
import time
keyboard = Controller()
time.sleep(2)
for char in "This is sample":
keyboard.press(char)
keyboard.release(char)
time.sleep(0.12)
Bro, I have been working on python and javascript for about 4 years. For example, what kind of script do you want?
Like this ?
Python:
from pynput.keyboard import Key, Controller
import time
keyboard = Controller()
time.sleep(2)
for char in "This is sample":
keyboard.press(char)
keyboard.release(char)
time.sleep(0.12)