python

Back Open Paginator
22.02.2026 10:23
mopicmp (@mopicmp@mastodon.social)

Python Tip: str.removeprefix/removesuffix

filename = 'test_utils.py'
module = filename.removesuffix('.py') # 'test_utils'
name = module.removeprefix('test_') # 'utils'

Python 3.9+ added removeprefix() and removesuffix(). No more error-prone string slicing.

raccoonette.gumroad.com/l/Pyth




Show Original Post


22.02.2026 10:23
mopicmp (@mopicmp@mastodon.social)

Python Tip: any() and all()

nums = [2, 4, 6, 8]
all_even = all(n % 2 == 0 for n in nums) # True
has_big = any(n > 5 for n in nums) # True

any() and all() short-circuit on generators. Elegant replacement for loop-based checks.

raccoonette.gumroad.com/l/Pyth




Show Original Post


22.02.2026 09:27
hylk3 (@hylk3@mastodon.nl)

Health-Sync: How I Automated My Nutrition and Sports Tracking with Python and Obsidian
Since early 2025 I've been using Obsidian as my central hub for daily planning: training schedules, study blocks, nutrition targets, and reflections all live in structured
hylkerozema.nl/2026/02/22/heal
#LiveUpdates #Calistenics #Eetmeter #Health #Nutrition #OpenSource #Python #QuantifiedSelf #Running #Strava




Show Original Post


22.02.2026 08:45
simon_brooke (@simon_brooke@mastodon.scot)

@ireneista @fogti I strongly feel that #Python is a language for people who despise any semblance of software engineering discipline. Every single part of the ecosystem seems a disorganised mess.

I know it does make it easy for people who are not software engineers to cobble together quite remarkable systems, but...

Some things are just too noisome even to touch.




Show Original Post


22.02.2026 08:22
lauhazn (@lauhazn@mas.to)

Hi, Fediverse friends. I would like to #GetFediHired for a #PartTime role that I can do from #Brno, #Czechia. I am especially interested in #DataAnalytics, #research, #HealthCare, and the #environment, but I am open to other roles. #FediHire

I have 12 years of experience in #InformationScience, including 8 years as a #medical #librarian, into which I incorporated the tools and principles of data analytics. My skills include #Python, #Excel, #SQL, #R, #Linux, and basic #Tableau. 1/2




Show Original Post


22.02.2026 08:14
anuragg (@anuragg@mastodon.social)

Blog
--------
How to use Blender and Python to minimize wastage of foam board while building a model plane?

soln.tech/blog/2d-packing-rc-a











Show Original Post


22.02.2026 07:08
eddiereasoner (@eddiereasoner@mstdn.social)

I’ve been thinking about making an for and to create a collage or grid of images varying in dimensions. Perhaps for front end stuff without overlaps, grid or flexbox will suffice. Issues arise when several moderately large images are to be displayed with overlaps (due to a smaller area to fill).

Any insights?




Show Original Post


22.02.2026 06:52
eddiereasoner (@eddiereasoner@mstdn.social)

@ricko The opposite would be great too, as a #Python developer.




Show Original Post


22.02.2026 06:34
247CodeGirl (@247CodeGirl@mastodon.social)

Season 1 Lesson 4 Part 5 - Your First Steps - What is a String - in Python





Show Original Post


22.02.2026 06:30
Brett_E_Carlock (@Brett_E_Carlock@mastodon.online)

Anyone I know good with Python/GTK, and familiar with Exaile media player?

I would like to see some changes, either as core PRs, or plugins, and can't code well enough to make them happen.

Curious to see what a napkin-math quote would be to have them coded, #NoAI, natch.

1) Moodbar background and highlight theme-aware, adjustable height, faster cursor update, increased samples/track

2) Custom columns (any field, including moodbars)

3) Desktop album art size/position

#Exaile #GTK #Python




Show Original Post


22.02.2026 04:30
villares (@villares@pynews.com.br)

WIP: Rendering of a dictionary that shows on each row, at the start on the left, one of the 76 triangles that can be drawn on a 3x3 grid, then all the other triangles that do not overlapp with it.
Find the sketch-a-day archives and tip jar at: abav.lugaralgum.com/sketch-a-d
Code for this sketch at: github.com/villares/sketch-a-d #Processing #Python #py5 #CreativeCoding





Show Original Post


22.02.2026 04:18
ricko (@ricko@tech.lgbt)

One slight variant option here: instead of writing fiction, I could put together a quick and dirty Learning Python for TypeScript Developers book.

There are a few texts like this already available, but they are (1) very brief, (2) increasingly out of date, and (3) too shallow. By which I mean, they mostly just cover the #Python syntax differences ... which are almost trivial. Especially if #TypeScript isn't your first language. Like, the syntax differences are the least interesting part of it all.

Instead, I could cover things like "here's how you do this common TS/JS/Node/npm task in the Python ecosystem", and "here are some idiomatic differences so your code won't look so alien".

As more and more of the world gets eaten by AI and Python, it seems like it could help some folks feel less like their careers are dead-ending into a brick wall.




Show Original Post


1 ...443 444 445 446 447 448 449 450 451 452 453 ...1590
UP