def main():
list_from_line = []
with open("input.txt") as f:
for line in f:
list_from_line += line.lower().strip().split()
unique_keys = set(list_from_line)
top = {
key: list_from_line.count(key) for key in unique_keys
}
max_count = max(top.values())
top_items = [item for item in top.items() if item[1] == max_count]
result = min(top_items, key = lambda x: x[0])
print(f"{result[0]} {result[1]}")
if __name__ == "__main__":
main()
abc 3
u 11
document.getElementById("g-recaptcha-response").innerHTML="TOKEN_FROM_RUCAPTCHA";
from tqdm import tqdm
with open("test.txt") as file:
num_lines = sum(1 for line in file)
file.seek(0)
with tqdm(total = num_lines) as pbar:
for line in file:
a = str.strip(line)
h = func_1(a)
func_2(a, h)
pbar.update(1)
@bot.message_handler(commands=['start'])
def start(message):
print(bot.send_message(message.chat.id, "tess").message_id)
def main(email, password):
pop = POP3_SSL("pop.yandex.by")
pop.user(email)
pop.pass_(password)
response, lst, octets = pop.list()
print(response, lst, octets)
for msgnum, msgsize in [i.split() for i in lst]:
(resp, lines, octets) = pop.retr(int(msgnum))
msgtext = "n".join(lines) + "nn"#Нужно отлаживать, тут бред происходит
message = email.message_from_string(msgtext)# тут тоже
print(message)
pop.dele(int(msgnum))
pop.quit()
def f_readlist():
with open('flats_list') as file_flats:
consetsen = file_flats
s = list()# s список
for s in consetsen:#s строка
s = s.split()# s список
return s
print(f_readlist())
import requests
import time
from bs4 import BeautifulSoup as BS
phone = input("phone: ")
num_name = []
phone_ow = requests.get(f'https://phonebook.space/?input={phone}', cookies={"__atuvs":""}).text
content = BS(phone_ow, 'html.parser').find('div', class_='results')
for i in content.find_all('li'):
num_name.append(i.text.strip())
name = ', '.join(num_name)
print(name)
class Wall(pygame.sprite.Sprite):
def init(self):
pygame.sprite.Sprite.__init__(self)
self.fill(BLACK)
self.rect = self.image.get_rect()
self.rect.center = (WIDTH / 2, HEIGHT / 2)
def create(self,colour,x,y):
self.image.fill(colour) #Тута
self.rect.y = y
self.rect.x = x
self.rect.width = 10
self.rect.height = 10
Wall.create("",GREEN,0,0)