Count words in a sentence with python

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üye
Katılım
12 Nis 2019
Mesajlar
35
Tepki puanı
13
Ödüller
4
7 HİZMET YILI
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:
2022-04-18-022330.png




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))


Output:
2022-04-18-021926.png
 
HALLO GES
Uzman Üye
Katılım
16 Nis 2022
Mesajlar
230
Tepki puanı
138
Ödüller
1
4 HİZMET YILI
thanks for sharing, i will try it
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:
2022-04-18-022330.png




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))


Output:
2022-04-18-021926.png
 
Life is too short to worry make it SUPREME
Süper Üye
Katılım
3 Şub 2019
Mesajlar
952
Çözümler
3
Tepki puanı
163
Ödüller
8
7 HİZMET YILI
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
 
Üye
Katılım
10 Haz 2019
Mesajlar
49
Tepki puanı
10
Ödüller
5
Yaş
30
6 HİZMET YILI
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:
2022-04-18-022330.png




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))


Output:
2022-04-18-021926.png
thx man, that helps too much for me
 
ERROR PROBLEM FIXER
Support
Katılım
25 Eyl 2018
Mesajlar
5,366
Çözümler
1,450
Tepki puanı
2,351
Ödüller
20
Sosyal
7 HİZMET YILI
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:
2022-04-18-022330.png




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))


Output:
2022-04-18-021926.png
thank you for share brother did u make a python script auto key press number or alphabet
 
Üye
Katılım
12 Nis 2019
Mesajlar
35
Tepki puanı
13
Ödüller
4
7 HİZMET YILI
thank you for share brother did u make a python script auto key press number or alphabet
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)

Output:
This is sample
 
ERROR PROBLEM FIXER
Support
Katılım
25 Eyl 2018
Mesajlar
5,366
Çözümler
1,450
Tepki puanı
2,351
Ödüller
20
Sosyal
7 HİZMET YILI
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)

Output:
This is sample
i want like this / this software its trail 30 days and its say 5$ to buy i did not buy
1650308092633.png
 
Üye
Katılım
12 Nis 2019
Mesajlar
35
Tepki puanı
13
Ödüller
4
7 HİZMET YILI
this would take some time to do so I can try to hack it instead :) Can you give me the name of the software?
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst