Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
f-strings
Search
Mariatta
January 22, 2018
Programming
460
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
f-strings
Lightning talk about f-strings. Presented at PyCascades 2018 in Vancouver.
Mariatta
January 22, 2018
More Decks by Mariatta
See All by Mariatta
There's an API for That!
mariatta
0
80
Introduction to PyCon US 2024
mariatta
0
300
PEP Talk
mariatta
0
900
PyCon US 2023: Sunday Morning Welcome Message
mariatta
0
140
PyConUS2023_Closing.pdf
mariatta
0
170
PyCon US 2023: Saturday Morning Welcome Message
mariatta
0
150
Welcome to PyCon US 2023
mariatta
0
150
PyCon US 2023 Lightning Talk
mariatta
0
280
Contributing to Python
mariatta
0
440
Other Decks in Programming
See All in Programming
AI Augmentation Techniques with Liberty
ivargrimstad
1
380
Performance Optimization With LLMs
xleitix
0
240
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
410
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
330
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.4k
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
240
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
200
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.2k
SODA - FACT BOOK(EN)
sodainc
1
210
Next.js: The final boss of Web Performance
guaca
0
380
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
360
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
280
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
How to build a perfect <img>
jonoalderson
1
6.2k
Test your architecture with Archunit
thirion
2
2.5k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
470
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
760
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Building the Perfect Custom Keyboard
takai
2
950
GitHub's CSS Performance
jonrohan
1033
470k
Transcript
F-strings @mariatta
F-strings?
the new way to format strings
starting in Python 3.6
How?
How? "Hello, %s. You’re %s." % (name, age)
How? "Hello, {name}. You’re {age}.".format(name=name, age=age) "Hello, %s. You’re %s."
% (name, age)
How? "Hello, {name}. You’re {age}.".format(name=name, age=age) f"Hello, {name}. You’re {age}."
"Hello, %s. You’re %s." % (name, age)
Alternate usage
Alternate usage f"Hello, {name}. You’re {age}."
Alternate usage F"Hello, {name}. You’re {age}." f"Hello, {name}. You’re {age}."
Call a function >>> def to_uppercase(input): ... return input.upper() ...
>>> name = “bart simpson” >>> print(f"Hi {to_uppercase(name)}!") Hi BART SIMPSON!
Format specifiers >>> pycascades = datetime(year=2018, month=1, day=22) >>> print(f"{pycascades:%b
%d, %Y}") Jan 22, 2018
F-strings
Faster than str.format
Python 3.6
Free download www.python.org
Build from source https://docs.python.org/3.6/using/unix.html
Change your OS consider: MacOS X, Windows 10, fedora 26,
ubuntu 17.10
None