<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mscneuro.neuro.uni-bremen.de/index.php?action=history&amp;feed=atom&amp;title=Formatted_String_Literals</id>
	<title>Formatted String Literals - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mscneuro.neuro.uni-bremen.de/index.php?action=history&amp;feed=atom&amp;title=Formatted_String_Literals"/>
	<link rel="alternate" type="text/html" href="https://mscneuro.neuro.uni-bremen.de/index.php?title=Formatted_String_Literals&amp;action=history"/>
	<updated>2026-06-02T05:49:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://mscneuro.neuro.uni-bremen.de/index.php?title=Formatted_String_Literals&amp;diff=313&amp;oldid=prev</id>
		<title>Davrot at 16:04, 17 October 2025</title>
		<link rel="alternate" type="text/html" href="https://mscneuro.neuro.uni-bremen.de/index.php?title=Formatted_String_Literals&amp;diff=313&amp;oldid=prev"/>
		<updated>2025-10-17T16:04:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:04, 17 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== The goal ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Using formated string literals is an easy way to produce formated strings from data / variables.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Using formated string literals is an easy way to produce formated strings from data / variables.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Davrot</name></author>
	</entry>
	<entry>
		<id>https://mscneuro.neuro.uni-bremen.de/index.php?title=Formatted_String_Literals&amp;diff=137&amp;oldid=prev</id>
		<title>Davrot: Created page with &quot; == The goal == Using formated string literals is an easy way to produce formated strings from data / variables.  Questions to [mailto:davrot@uni-bremen.de David Rotermund]  == Basic Formatted String Literals == A formatted string literals starts with an f and the variables that you want to print are placed at their intended position embeded into { }. For example:&lt;syntaxhighlight lang=&quot;python&quot;&gt;import numpy as np  a: str = &quot;Hello&quot; b: int = 1 c: float = np.pi  mystring: st...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mscneuro.neuro.uni-bremen.de/index.php?title=Formatted_String_Literals&amp;diff=137&amp;oldid=prev"/>
		<updated>2025-10-15T10:56:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == The goal == Using formated string literals is an easy way to produce formated strings from data / variables.  Questions to [mailto:davrot@uni-bremen.de David Rotermund]  == Basic Formatted String Literals == A formatted string literals starts with an f and the variables that you want to print are placed at their intended position embeded into { }. For example:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;import numpy as np  a: str = &amp;quot;Hello&amp;quot; b: int = 1 c: float = np.pi  mystring: st...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== The goal ==&lt;br /&gt;
Using formated string literals is an easy way to produce formated strings from data / variables.&lt;br /&gt;
&lt;br /&gt;
Questions to [mailto:davrot@uni-bremen.de David Rotermund]&lt;br /&gt;
&lt;br /&gt;
== Basic Formatted String Literals ==&lt;br /&gt;
A formatted string literals starts with an f and the variables that you want to print are placed at their intended position embeded into { }. For example:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;import numpy as np&lt;br /&gt;
&lt;br /&gt;
a: str = &amp;quot;Hello&amp;quot;&lt;br /&gt;
b: int = 1&lt;br /&gt;
c: float = np.pi&lt;br /&gt;
&lt;br /&gt;
mystring: str = f&amp;quot;A: {a} B: {b} C: {c}&amp;quot;&lt;br /&gt;
print(mystring)&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;A: Hello B: 1 C: 3.141592653589793&amp;lt;/syntaxhighlight&amp;gt;In the case the string is to long (i.e. longer than the 80 character limit), you can use this construct to break the line into several lines:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;import numpy as np&lt;br /&gt;
&lt;br /&gt;
a: str = &amp;quot;Hello&amp;quot;&lt;br /&gt;
b: int = 1&lt;br /&gt;
c: float = np.pi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mystring: str = (&lt;br /&gt;
    f&amp;quot;Variable A: {a} &amp;quot; &lt;br /&gt;
    &amp;quot;Blablablablabla &amp;quot; &lt;br /&gt;
    f&amp;quot;Variable B: {b} &amp;quot; &lt;br /&gt;
    f&amp;quot;Variable C: {c} &amp;quot;&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
print(mystring)&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;Variable A: Hello Blablablablabla Variable B: 1 Variable C: 3.141592653589793&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [https://docs.python.org/3/library/string.html#formatspec Formats] ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;format_spec     ::=  [[fill]align][sign][#][0][width][grouping_option][.precision][type]&lt;br /&gt;
fill            ::=  &amp;lt;any character&amp;gt;&lt;br /&gt;
align           ::=  &amp;quot;&amp;lt;&amp;quot; | &amp;quot;&amp;gt;&amp;quot; | &amp;quot;=&amp;quot; | &amp;quot;^&amp;quot;&lt;br /&gt;
sign            ::=  &amp;quot;+&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot; &amp;quot;&lt;br /&gt;
width           ::=  digit+&lt;br /&gt;
grouping_option ::=  &amp;quot;_&amp;quot; | &amp;quot;,&amp;quot;&lt;br /&gt;
precision       ::=  digit+&lt;br /&gt;
type            ::=  &amp;quot;b&amp;quot; | &amp;quot;c&amp;quot; | &amp;quot;d&amp;quot; | &amp;quot;e&amp;quot; | &amp;quot;E&amp;quot; | &amp;quot;f&amp;quot; | &amp;quot;F&amp;quot; | &amp;quot;g&amp;quot; | &amp;quot;G&amp;quot; | &amp;quot;n&amp;quot; | &amp;quot;o&amp;quot; | &amp;quot;s&amp;quot; | &amp;quot;x&amp;quot; | &amp;quot;X&amp;quot; | &amp;quot;%&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Integer formats ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|‘b’&lt;br /&gt;
|Binary format.&lt;br /&gt;
|-&lt;br /&gt;
|‘c’&lt;br /&gt;
|Character.&lt;br /&gt;
|-&lt;br /&gt;
|‘d’&lt;br /&gt;
|Decimal Integer.&lt;br /&gt;
|-&lt;br /&gt;
|‘o’&lt;br /&gt;
|Octal format.&lt;br /&gt;
|-&lt;br /&gt;
|‘x’&lt;br /&gt;
|Hex format.&lt;br /&gt;
|-&lt;br /&gt;
|‘X’&lt;br /&gt;
|Hex format.&lt;br /&gt;
|-&lt;br /&gt;
|‘n’&lt;br /&gt;
|Number.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;‘d’&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|‘+’&lt;br /&gt;
|indicates that a sign should be used for both positive as well as negative numbers.&lt;br /&gt;
|-&lt;br /&gt;
|‘-’&lt;br /&gt;
|indicates that a sign should be used only for negative numbers (this is the default behavior).&lt;br /&gt;
|-&lt;br /&gt;
|space&lt;br /&gt;
|indicates that a leading space should be used on positive numbers, and a minus sign on negative numbers.&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|‘&amp;amp;#x3C;’&lt;br /&gt;
|Forces the field to be left-aligned within the available space (this is the default for most objects).&lt;br /&gt;
|-&lt;br /&gt;
|‘&amp;amp;#x3E;’&lt;br /&gt;
|Forces the field to be right-aligned within the available space (this is the default for numbers).&lt;br /&gt;
|-&lt;br /&gt;
|‘=’&lt;br /&gt;
|Forces the padding to be placed after the sign (if any) but before the digits.&lt;br /&gt;
|-&lt;br /&gt;
|‘^’&lt;br /&gt;
|Forces the field to be centered within the available space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Float formats ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|‘e’&lt;br /&gt;
|Scientific notation.&lt;br /&gt;
|-&lt;br /&gt;
|‘E’&lt;br /&gt;
|Scientific notation.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;‘f’&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Fixed-point notation.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|‘F’&lt;br /&gt;
|Fixed-point notation.&lt;br /&gt;
|-&lt;br /&gt;
|‘g’&lt;br /&gt;
|General format.&lt;br /&gt;
|-&lt;br /&gt;
|‘G’&lt;br /&gt;
|General format.&lt;br /&gt;
|-&lt;br /&gt;
|‘n’&lt;br /&gt;
|Number.&lt;br /&gt;
|-&lt;br /&gt;
|‘%’&lt;br /&gt;
|Percentage. &lt;br /&gt;
|-&lt;br /&gt;
|None&lt;br /&gt;
|‘g’&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|‘+’&lt;br /&gt;
|indicates that a sign should be used for both positive as well as negative numbers.&lt;br /&gt;
|-&lt;br /&gt;
|‘-’&lt;br /&gt;
|indicates that a sign should be used only for negative numbers (this is the default behavior).&lt;br /&gt;
|-&lt;br /&gt;
|space&lt;br /&gt;
|indicates that a leading space should be used on positive numbers, and a minus sign on negative numbers.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;import numpy as np&lt;br /&gt;
&lt;br /&gt;
value: float = np.pi&lt;br /&gt;
&lt;br /&gt;
print(f&amp;quot;{value}&amp;quot;)&lt;br /&gt;
print(f&amp;quot;{value:.3f}&amp;quot;)&lt;br /&gt;
print(f&amp;quot;{value:+.3f}&amp;quot;)&lt;br /&gt;
print(f&amp;quot;{-value:+.3f}&amp;quot;)&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;3.141592653589793&lt;br /&gt;
3.142&lt;br /&gt;
+3.142&lt;br /&gt;
-3.142&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;import numpy as np&lt;br /&gt;
&lt;br /&gt;
value: float = np.pi&lt;br /&gt;
&lt;br /&gt;
print(f&amp;quot;{value:&amp;gt;30.2f}&amp;quot;)&lt;br /&gt;
print(f&amp;quot;{value:&amp;lt;30.2f}&amp;quot;)&lt;br /&gt;
print(f&amp;quot;{value:=30.2f}&amp;quot;)&lt;br /&gt;
print(f&amp;quot;{value:^30.2f}&amp;quot;)&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;                          3.14&lt;br /&gt;
3.14                          &lt;br /&gt;
                          3.14&lt;br /&gt;
             3.14             &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== String formats ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|‘s’&lt;br /&gt;
|String format.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;‘s’&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Dates ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;# %%&lt;br /&gt;
from datetime import datetime&lt;br /&gt;
&lt;br /&gt;
d = datetime.now()&lt;br /&gt;
print(f&amp;quot;{d:%Y-%m-%d %H:%M:%S}&amp;quot;)&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;2022-04-03 01:18:45&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Directive&lt;br /&gt;
!Meaning&lt;br /&gt;
!Example&lt;br /&gt;
|-&lt;br /&gt;
|%a&lt;br /&gt;
|Weekday as locale’s abbreviated name.&lt;br /&gt;
|Sun, Mon, …, Sat (en_US); So, Mo, …, Sa (de_DE)&lt;br /&gt;
|-&lt;br /&gt;
|%A&lt;br /&gt;
|Weekday as locale’s full name.&lt;br /&gt;
|Sunday, Monday, …, Saturday (en_US);Sonntag, Montag, …, Samstag (de_DE)&lt;br /&gt;
|-&lt;br /&gt;
|%w&lt;br /&gt;
|Weekday as a decimal number, where 0 is Sunday and 6 is Saturday.&lt;br /&gt;
|0, 1, …, 6&lt;br /&gt;
|-&lt;br /&gt;
|%d&lt;br /&gt;
|Day of the month as a zero-padded decimal number.&lt;br /&gt;
|01, 02, …, 31&lt;br /&gt;
|-&lt;br /&gt;
|%b&lt;br /&gt;
|Month as locale’s abbreviated name.&lt;br /&gt;
|Jan, Feb, …, Dec (en_US); Jan, Feb, …, Dez (de_DE)&lt;br /&gt;
|-&lt;br /&gt;
|%B&lt;br /&gt;
|Month as locale’s full name.&lt;br /&gt;
|January, February, …, December (en_US); Januar, Februar, …, Dezember (de_DE)&lt;br /&gt;
|-&lt;br /&gt;
|%m&lt;br /&gt;
|Month as a zero-padded decimal number.&lt;br /&gt;
|01, 02, …, 12&lt;br /&gt;
|-&lt;br /&gt;
|%y&lt;br /&gt;
|Year without century as a zero-padded decimal number.&lt;br /&gt;
|00, 01, …, 99&lt;br /&gt;
|-&lt;br /&gt;
|%Y&lt;br /&gt;
|Year with century as a decimal number.&lt;br /&gt;
|0001, 0002, …, 2013, 2014, …, 9998, 9999&lt;br /&gt;
|-&lt;br /&gt;
|%H&lt;br /&gt;
|Hour (24-hour clock) as a zero-padded decimal number.&lt;br /&gt;
|00, 01, …, 23&lt;br /&gt;
|-&lt;br /&gt;
|%I&lt;br /&gt;
|Hour (12-hour clock) as a zero-padded decimal number.&lt;br /&gt;
|01, 02, …, 12&lt;br /&gt;
|-&lt;br /&gt;
|%p&lt;br /&gt;
|Locale’s equivalent of either AM or PM.&lt;br /&gt;
|AM, PM (en_US); am, pm (de_DE)&lt;br /&gt;
|-&lt;br /&gt;
|%M&lt;br /&gt;
|Minute as a zero-padded decimal number.&lt;br /&gt;
|00, 01, …, 59&lt;br /&gt;
|-&lt;br /&gt;
|%S&lt;br /&gt;
|Second as a zero-padded decimal number.&lt;br /&gt;
|00, 01, …, 59&lt;br /&gt;
|-&lt;br /&gt;
|%f&lt;br /&gt;
|Microsecond as a decimal number, zero-padded to 6 digits.&lt;br /&gt;
|000000, 000001, …, 999999&lt;br /&gt;
|-&lt;br /&gt;
|%z&lt;br /&gt;
|UTC offset in the form ±HHMM[SS[.ffffff]] (empty string if the object is naive).&lt;br /&gt;
|(empty), +0000, -0400, +1030, +063415, -030712.345216&lt;br /&gt;
|-&lt;br /&gt;
|%Z&lt;br /&gt;
|Time zone name (empty string if the object is naive).&lt;br /&gt;
|(empty), UTC, GMT&lt;br /&gt;
|-&lt;br /&gt;
|%j&lt;br /&gt;
|Day of the year as a zero-padded decimal number.&lt;br /&gt;
|001, 002, …, 366&lt;br /&gt;
|-&lt;br /&gt;
|%U&lt;br /&gt;
|Week number of the year (Sunday as the first day of the week) as a zero-padded decimal number. All days in a new year preceding the first Sunday are considered to be in week 0.&lt;br /&gt;
|00, 01, …, 53&lt;br /&gt;
|-&lt;br /&gt;
|%W&lt;br /&gt;
|Week number of the year (Monday as the first day of the week) as a zero-padded decimal number. All days in a new year preceding the first Monday are considered to be in week 0.&lt;br /&gt;
|00, 01, …, 53&lt;br /&gt;
|-&lt;br /&gt;
|%c&lt;br /&gt;
|Locale’s appropriate date and time representation.&lt;br /&gt;
|Tue Aug 16 21:30:00 1988 (en_US); Di 16 Aug 21:30:00 1988 (de_DE)&lt;br /&gt;
|-&lt;br /&gt;
|%x&lt;br /&gt;
|Locale’s appropriate date representation.&lt;br /&gt;
|08/16/88 (None); 08/16/1988 (en_US); 16.08.1988 (de_DE)&lt;br /&gt;
|-&lt;br /&gt;
|%X&lt;br /&gt;
|Locale’s appropriate time representation.&lt;br /&gt;
|21:30:00 (en_US); 21:30:00 (de_DE)&lt;br /&gt;
|-&lt;br /&gt;
|%%&lt;br /&gt;
|A literal ‘%’ character.&lt;br /&gt;
|%&lt;br /&gt;
|}&lt;br /&gt;
see [https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes here] for the date formats &lt;br /&gt;
&lt;br /&gt;
== [https://docs.python.org/3/reference/lexical_analysis.html#escape-sequences Escape Sequence​] ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Escape Sequence&lt;br /&gt;
!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#x3C;newline&amp;amp;#x3E;&lt;br /&gt;
|Backslash and newline ignored&lt;br /&gt;
|-&lt;br /&gt;
|\ \&lt;br /&gt;
|Backslash (\)&lt;br /&gt;
|-&lt;br /&gt;
|\’&lt;br /&gt;
|Single quote (’)&lt;br /&gt;
|-&lt;br /&gt;
|\”&lt;br /&gt;
|Double quote (“)&lt;br /&gt;
|-&lt;br /&gt;
|\a&lt;br /&gt;
|ASCII Bell (BEL)&lt;br /&gt;
|-&lt;br /&gt;
|\b&lt;br /&gt;
|ASCII Backspace (BS)&lt;br /&gt;
|-&lt;br /&gt;
|\f&lt;br /&gt;
|ASCII Formfeed (FF)&lt;br /&gt;
|-&lt;br /&gt;
|\n&lt;br /&gt;
|ASCII Linefeed (LF)&lt;br /&gt;
|-&lt;br /&gt;
|\r&lt;br /&gt;
|ASCII Carriage Return (CR)&lt;br /&gt;
|-&lt;br /&gt;
|\t&lt;br /&gt;
|ASCII Horizontal Tab (TAB)&lt;br /&gt;
|-&lt;br /&gt;
|\v&lt;br /&gt;
|ASCII Vertical Tab (VT)&lt;br /&gt;
|-&lt;br /&gt;
|\ooo&lt;br /&gt;
|Character with octal value ooo&lt;br /&gt;
|-&lt;br /&gt;
|\xhh&lt;br /&gt;
|Character with hex value hh&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Escape Sequence&lt;br /&gt;
!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|\N{name}&lt;br /&gt;
|Character named name in the Unicode database&amp;amp;#x3E;&lt;br /&gt;
|-&lt;br /&gt;
|\uxxxx&lt;br /&gt;
|Character with 16-bit hex value xxxx&lt;br /&gt;
|-&lt;br /&gt;
|\Uxxxxxxxx&lt;br /&gt;
|Character with 32-bit hex value xxxxxxxx&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
* [https://docs.python.org/3/tutorial/inputoutput.html#formatted-string-literals Formatted String Literals]&lt;br /&gt;
* [https://docs.python.org/3/library/string.html#formatspec Format Specification Mini-Language]&lt;/div&gt;</summary>
		<author><name>Davrot</name></author>
	</entry>
</feed>