Douglas Belcher retweeted
If you want to split a #python string just once, you can use .split or the less-known .partition:
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.
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.…
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:
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)
Douglas Belcher retweeted
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-…
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!
Douglas Belcher retweeted
🐍 Set Up Your Development Environment: Overview [Video] 📺 realpython.com/lessons/your-…
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 🚀
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…
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:
Douglas Belcher retweeted
Ethics and AI: 3 Conversations Companies Need to Have
bit.ly/3toGNgl
#MachineLearning #AI #Python #DataScience #BigData
#DeepLearning #IoT #NLP #100DaysOfCode #5G #robots
#tech #ArtificialIntelligence #cloud #4IR #cybersecurity
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"
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"
Douglas Belcher retweeted
🇬🇧 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
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.



















