Here's what I have as a reference. Basically a summary of the Format Specification Mini-Language . This would all go after a : in the f-string curly braces. So if you want a float with 2 decimal place precision, with * as fill and right aligned in a field width of 10 characters you'd do f"{val:*>10.2f}" [[fill]align][sign][#][0][minimumwidth][.precision][type] Fill: Add a character to fill with. Must be followed by Align flag. Align: '<' - Forces the field to be left-aligned within the available space (This is the default.) '>' - Forces the field to be right-aligned within the available space. '=' - Forces the padding to be placed after the sign (if any) but before the digits. This is used for printing fields in the form '+000000120'. This alignment option is only valid for numeric types. '^' - Forces the field to be centered within the available space. Sign: '+' - indicates that a sign should be used for both positive as well as negative numbers '-' - indicates that a sign should be used only for negative numbers (this is the default behavior) ' ' - indicates that a leading space should be used on positive numbers #: Flags alternate numbering formats; binary, octal, and hexadecimal output will be prefixed with '0b', '0o', and '0x', respectively. 0: Zero-padding. Equivalent to fill '=' and character of '0' Minimumwidth: Min width of the field. Precision: Decimal places for floats or max field size for non-numeric types. Type: Integers: 'b' - Binary. Outputs the number in base 2. 'c' - Character. Converts the integer to the corresponding Unicode character before printing. 'd' - Decimal Integer. Outputs the number in base 10. 'o' - Octal format. Outputs the number in base 8. 'x' - Hex format. Outputs the number in base 16, using lower- case letters for the digits above 9. 'X' - Hex format. Outputs the number in base 16, using upper- case letters for the digits above 9. 'n' - Number. This is the same as 'd', except that it uses the current locale setting to insert the appropriate number separator characters. '' (None) - the same as 'd' Floats: 'e' - Exponent notation. Prints the number in scientific notation using the letter 'e' to indicate the exponent. 'E' - Exponent notation. Same as 'e' except it converts the number to uppercase. 'f' - Fixed point. Displays the number as a fixed-point number. 'F' - Fixed point. Same as 'f' except it converts the number to uppercase. 'g' - General format. This prints the number as a fixed-point number, unless the number is too large, in which case it switches to 'e' exponent notation. 'G' - General format. Same as 'g' except switches to 'E' if the number gets to large. 'n' - Number. This is the same as 'g', except that it uses the current locale setting to insert the appropriate number separator characters. '%' - Percentage. Multiplies the number by 100 and displays in fixed ('f') format, followed by a percent sign. '' (None) - similar to 'g', except that it prints at least one digit after the decimal point. Answer from ebdbbb on reddit.com
Obsidian
help.obsidian.md › syntax
Basic formatting syntax - Obsidian Help
Basic formatting syntax - Obsidian Help
Importer
Importer - Obsidian Help
Templates
Templates - Obsidian Help
Callouts
Callouts - Obsidian Help
Basic formatting syntax
Basic formatting syntax - Obsidian Help
What will I learn in this course?
This course consists of four modules.
Module 1 - Python Basics
oYour first program
oTypes
oExpressions and Variables
oString Operations
Module 2 - Python Data Structures
oLists and Tuples
oSets
oDictionaries
Module 3 - Python Programming Fundamentals
oConditions and Branching
oLoops
oFunctions
oObjects and Classes
Module 4 - Working with Data in Python
oReading files with open
oWriting files with open
oLoading data with Pandas
oNumpy
Finally, you will create a project to test your skills.
coursera.org
coursera.org › browse › data science › data analysis
Python for Data Science, AI & Development | Coursera
When will I have access to the lectures and assignments?
To access the course materials, assignments and to earn a Certificate, you will need to purchase the Certificate experience when you enroll in a course. You can try a Free Trial instead, or apply for Financial Aid. The course may offer 'Full Course, No Certificate' instead. This option lets you see all course materials, submit required assessments, and get a final grade. This also means that you will not be able to purchase a Certificate experience.
coursera.org
coursera.org › browse › data science › data analysis
Python for Data Science, AI & Development | Coursera
What will I get if I subscribe to this Certificate?
When you enroll in the course, you get access to all of the courses in the Certificate, and you earn a certificate when you complete the work. Your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile.
coursera.org
coursera.org › browse › data science › data analysis
Python for Data Science, AI & Development | Coursera
Videos
Cheatography
cheatography.com › eazykaye › cheat-sheets › python3-f-strings
Python3 F-Strings Cheat Sheet by eazykaye - Download free from Cheatography - Cheatography.com: Cheat Sheets For Every Occasion
https://cheatography.com/eazykaye/cheat-sheets/python3-f-strings/ //media.cheatography.com/storage/thumb/eazykaye_python3-f-strings.750.jpg ... Your Download Will Begin Automatically in 12 Seconds. ... No comments yet. Add yours below! ... Contains formulas, tables, and examples showing patterns and options focused on number formatting for Python's Formatted String Literals -- i.e., F-Strings.
Coursera
coursera.org › browse › data science › data analysis
Python for Data Science, AI & Development | Coursera
October 20, 2022 - Hands-on Lab: Write Your First Program• 10 minutes · Hands-on Lab: Types• 10 minutes · Hands-on Lab: Expression and Variables• 10 minutes · Hands-On Lab: String Operations• 30 minutes · (Optional) Reading: Format Strings in Python• 5 minutes · Cheat Sheet: Python Basics • 15 minutes ·
Fstring
fstring.help › cheat
Python f-string cheat sheet
Type f with precision .n displays n digits after the decimal point. Type g with precision .n displays n significant digits in scientific notation. Trailing zeros are not displayed. ... An empty type is synonymous with d for integers. These format specifications only work on integers (int).
Top answer 1 of 2
3
Here's what I have as a reference. Basically a summary of the Format Specification Mini-Language . This would all go after a : in the f-string curly braces. So if you want a float with 2 decimal place precision, with * as fill and right aligned in a field width of 10 characters you'd do f"{val:*>10.2f}" [[fill]align][sign][#][0][minimumwidth][.precision][type] Fill: Add a character to fill with. Must be followed by Align flag. Align: '<' - Forces the field to be left-aligned within the available space (This is the default.) '>' - Forces the field to be right-aligned within the available space. '=' - Forces the padding to be placed after the sign (if any) but before the digits. This is used for printing fields in the form '+000000120'. This alignment option is only valid for numeric types. '^' - Forces the field to be centered within the available space. Sign: '+' - indicates that a sign should be used for both positive as well as negative numbers '-' - indicates that a sign should be used only for negative numbers (this is the default behavior) ' ' - indicates that a leading space should be used on positive numbers #: Flags alternate numbering formats; binary, octal, and hexadecimal output will be prefixed with '0b', '0o', and '0x', respectively. 0: Zero-padding. Equivalent to fill '=' and character of '0' Minimumwidth: Min width of the field. Precision: Decimal places for floats or max field size for non-numeric types. Type: Integers: 'b' - Binary. Outputs the number in base 2. 'c' - Character. Converts the integer to the corresponding Unicode character before printing. 'd' - Decimal Integer. Outputs the number in base 10. 'o' - Octal format. Outputs the number in base 8. 'x' - Hex format. Outputs the number in base 16, using lower- case letters for the digits above 9. 'X' - Hex format. Outputs the number in base 16, using upper- case letters for the digits above 9. 'n' - Number. This is the same as 'd', except that it uses the current locale setting to insert the appropriate number separator characters. '' (None) - the same as 'd' Floats: 'e' - Exponent notation. Prints the number in scientific notation using the letter 'e' to indicate the exponent. 'E' - Exponent notation. Same as 'e' except it converts the number to uppercase. 'f' - Fixed point. Displays the number as a fixed-point number. 'F' - Fixed point. Same as 'f' except it converts the number to uppercase. 'g' - General format. This prints the number as a fixed-point number, unless the number is too large, in which case it switches to 'e' exponent notation. 'G' - General format. Same as 'g' except switches to 'E' if the number gets to large. 'n' - Number. This is the same as 'g', except that it uses the current locale setting to insert the appropriate number separator characters. '%' - Percentage. Multiplies the number by 100 and displays in fixed ('f') format, followed by a percent sign. '' (None) - similar to 'g', except that it prints at least one digit after the decimal point.
2 of 2
1
A cheat sheet for f-string would be too short and kind of useless since f-string are super simple. If you want to put a number just do it. Ex. name: str = "Albus Dumbledore" age: int = 116 print(f"Name: {name}, Age: {age}") As you can see, I simply put age (which is an int) inside 2 brackets in the string (don't forget the f) and let Python do it's magic. (If you want you can use the example above as your cheat sheet)
Cheatography
cheatography.com › brianallan › cheat-sheets › python-f-strings-number-formatting
Python F-Strings Number Formatting Cheat Sheet by BrianAllan - Download free from Cheatography - Cheatography.com: Cheat Sheets For Every Occasion
March 16, 2022 - Contains formulas, tables, and examples showing patterns and options focused on number formatting for Python's Formatted String Literals -- i.e., F-Strings.
DEV Community
dev.to › amohgodwin › f-strings-the-ultimate-cheatsheet-for-python-string-formatting-3cn
F-Strings: The Ultimate Cheatsheet for Python String Formatting - DEV Community
July 13, 2025 - First, let's briefly look at the older methods f-strings improve upon. ... folder = "/home/user/john/movies" filename = "Big Buck Bunny.mp4" print("The folder name is '" + folder + "' and the filename is '" + filename + "'.") ... All these methods work, but they can be verbose and hard to read, especially with multiple variables. Now, let's see how f-strings can simplify the previous examples.
Hacker News
news.ycombinator.com › item
Python f-string cheat sheets (2022) | Hacker News
August 22, 2025 - I'm also the author of https://fstring.help/cheat/ (though not of the homepage) and I haven't yet linked back to that new tool. I was surprised to the cheat sheet here today but not the format guesser · At the very least, your tool wasn't able to figure it out and hardcoded most of the number ...
Tech
abc-notes.data.tech.gov.sg › notes › topic-1-llm-&-prompt-engineering › 7.-extra-f-strings-formatting-cheat-sheet.html
7. Extra - F-strings formatting Cheat Sheet
Title: Extra - F-strings formatting Cheat Sheet · 1. Expressions Inside Braces · 2. Calling Functions · 3. Format Specifiers · 4. Dictionary Values · 5. Date Formatting · 6. Multiline F-strings · 7. Conditional Expressions · 8. Nesting F-strings · 9. Using Braces · 10. Debugging with F-strings (Python 3.8+) 11.
Cheatography
cheatography.com › brianallan › cheat-sheets › python-f-strings-basics
Python F-Strings Basics Cheat Sheet by BrianAllan - Download free from Cheatography - Cheatography.com: Cheat Sheets For Every Occasion
March 16, 2022 - Contains formulas, tables, and examples showing patterns and options, with the exception of number formatting, for Python's Formatted String Literals -- i.e., F-Strings. ... https://cheatography.com/brianallan/cheat-sheets/python-f-strings-basics/ //media.cheatography.com/storage/thumb/brianallan_python-f-strings-basics.750.jpg