6
submitted 1 week ago* (last edited 1 week ago) by CoderSupreme@programming.dev to c/python@programming.dev

I have a list of communities, each with total votes, upvote percentage, and the community name. I want to sort the list by 'engagement,' which would be some combination of total votes and upvote percentage. What is the best way to do this? What would be the best measure of 'engagement' with each community given this data?

you are viewing a single comment's thread
view the rest of the comments
[-] Dunstabzugshaubitze@feddit.org 1 points 1 week ago

https://docs.python.org/3/library/stdtypes.html#list.sort

supply a function as key that produces a numerical value for whatever you define as "engagement".

this post was submitted on 17 Oct 2025
6 points (100.0% liked)

Python

7532 readers
80 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS