PYTHONL Telegram 4930
This media is not supported in your browser
VIEW IN TELEGRAM
🔥 Совет дня Python: быстро получить частоту элементов в списка

Когда нужно узнать, сколько раз каждый элемент встречается в списке — не пиши вручную циклы. Используй collections.Counter:


from collections import Counter

items = ['apple', 'banana', 'apple', 'orange', 'banana', 'apple']
freq = Counter(items)

print(freq)
# 👉 Counter({'apple': 3, 'banana': 2, 'orange': 1})


📌 Удобно для:
— подсчёта слов
— анализа логов
— быстрой статистики по спискам



@pythonl
20👍7🔥6



tgoop.com/pythonl/4930
Create:
Last Update:

🔥 Совет дня Python: быстро получить частоту элементов в списка

Когда нужно узнать, сколько раз каждый элемент встречается в списке — не пиши вручную циклы. Используй collections.Counter:


from collections import Counter

items = ['apple', 'banana', 'apple', 'orange', 'banana', 'apple']
freq = Counter(items)

print(freq)
# 👉 Counter({'apple': 3, 'banana': 2, 'orange': 1})


📌 Удобно для:
— подсчёта слов
— анализа логов
— быстрой статистики по спискам



@pythonl

BY Python/ django


Share with your friend now:
tgoop.com/pythonl/4930

View MORE
Open in Telegram


Telegram News

Date: |

There have been several contributions to the group with members posting voice notes of screaming, yelling, groaning, and wailing in different rhythms and pitches. Calling out the “degenerate” community or the crypto obsessives that engage in high-risk trading, Co-founder of NFT renting protocol Rentable World emiliano.eth shared this group on his Twitter. He wrote: “hey degen, are you stressed? Just let it out all out. Voice only tg channel for screaming”. Some Telegram Channels content management tips When choosing the right name for your Telegram channel, use the language of your target audience. The name must sum up the essence of your channel in 1-3 words. If you’re planning to expand your Telegram audience, it makes sense to incorporate keywords into your name. Ng was convicted in April for conspiracy to incite a riot, public nuisance, arson, criminal damage, manufacturing of explosives, administering poison and wounding with intent to do grievous bodily harm between October 2019 and June 2020. With the administration mulling over limiting access to doxxing groups, a prominent Telegram doxxing group apparently went on a "revenge spree."
from us


Telegram Python/ django
FROM American