Douglas Belcher (@ddbelcher) profile picture

IT Application Specialist

St Louis, MO
Joined March 2011
Photo by Douglas Belcher (@ddbelcher)Photo by Douglas Belcher (@ddbelcher)Photo by Douglas Belcher (@ddbelcher)
Douglas Belcher retweeted
If you want to split a #python string just once, you can use .split or the less-known .partition:
8
88
498
Douglas Belcher retweeted
Been encoding videos for the new Textualize.io site. This video is going in the hero section. It's a teaser of Textual. I suspect we'll update this video from time to time when new features come online.
6
10
3
85
Douglas Belcher retweeted
How can you break out of a #python double loop? Use a generator to make it a single loop instead! More tips about iteration at nedbatchelder.com/text/iter.…
50
263
20
1,897
Douglas Belcher retweeted
Also: you can also use variables (or expressions?!) for the formatting information! More details and explanation at fstring.help/ by @the_compiler
String formatting in #Python lets you left-, right-, or center-justify a value. You can specify the fill character to use. The syntax is colon, fill-char, <^>, width:
2
13
154
Douglas Belcher retweeted
Based on how much I see written about string formatting, we definitely need more resources explaining it. Ideally (one day...) the official Python docs will include a section that demonstrates string formatting in more a digestible way (❤ the docs, but some bits are too dense)
1
1
3
Python is a versatile & popular programming language. You can use it for all sorts of projects, from web dev & data analysis to machine learning & AI. In this guide @codergirl1991 shares some free Python courses for beginners to get you started coding. freecodecamp.org/news/learn-…
2
60
1
224
Douglas Belcher retweeted
I'd sitting on an article on string formatting for weeks without realizing fstring.help would exist just before I published it! 😆 pym.dev/string-formatting/ is long while fstring.help is short. I plan to link to both in my teaching materials. 💓
Yesterday, I launched fstring.help: A short, example-based reference for #Python f-string syntax. Turns out being able to show it in a @PyConDE lightning talk was a great motivation for finally launching it!
3
6
19
Douglas Belcher retweeted
Me: Moving from DevOps into the AI/ML/DS space.
2
1
9
Douglas Belcher retweeted
Check out Rodrigo’s Python book! It’s free🤩
In the last 6 hours, more than 1200 people downloaded my free Python 🐍 book. It is an honour that YOU are trusting ME to help you master Python! Also, huge shout-out to @svpino for helping me reach a massive audience! Let's go 🚀
3
2
17
Douglas Belcher retweeted
🐍📰 Manage Your To-Do Lists Using Python and Django This step-by-step project will teach you how to use Django's class-based views to build a powerful app while dramatically reducing your development time #python realpython.com/django-todo-l…
5
16
Douglas Belcher retweeted
String formatting in #Python lets you left-, right-, or center-justify a value. You can specify the fill character to use. The syntax is colon, fill-char, <^>, width:
17
164
22
1,125
Douglas Belcher retweeted
Enjoyed this Python string formatting thread? 1. Follow me (@treyhunner) for more Python tips 🌠 2. Retweet the below tweet to share this with others 🔃 3. Reply or quote-tweet with your (new?) favorite f-string feature ⤵️
#Python's string formatting syntax can be customized in some very complex but very powerful ways. In its most basic form, you can inject a variable into a string: >>> name = "Trey" >>> text = f"My name is {name}" Or an expression: >>> more = f"It has {len(name)} letters"
2
6
Douglas Belcher retweeted
Get full access to our large (and growing) collection of online Python tutorials and in-depth training materials for your whole team! With over 1,900 lessons, and new content published weekly, your team will always find something to boost their skills.  realpython.com/teams
Douglas Belcher retweeted
#Python's string formatting syntax can be customized in some very complex but very powerful ways. In its most basic form, you can inject a variable into a string: >>> name = "Trey" >>> text = f"My name is {name}" Or an expression: >>> more = f"It has {len(name)} letters"
2
3
1
21
🇬🇧 Learn Coding with Java from Scratch: Essential Training 2022 🔗coursemetry.com/learn-coding… 4 days or 528 registrations left #Udemy #coupon #course #developer #100DaysOfCode #programming #Development #Java
1
4
7
Douglas Belcher retweeted
A couple of years ago, I wrote a #Python script to archive my arXiv voting records from @astrocrash's VoxCharta for #astro papers. It is now my go-to repo to test out new tools and libraries such as @willmcgugan's Rich and @tiangolo's Typer.
2
2
11