Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 37ed7cf

Browse files
committed
Format
1 parent 48a4bb5 commit 37ed7cf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,8 @@ import re
390390
Format
391391
------
392392
```python
393-
<str> = f'{<el_1>}, {<el_2>}' # Or: '%s, %s' % (<el_1>, <el_2>)
394-
<str> = '{}, {}'.format(<el_1>, <el_2>) # Or: '{0}, {1}'.format(<el_1>, <el_2>)
393+
<str> = f'{<el_1>}, {<el_2>}'
394+
<str> = '{}, {}'.format(<el_1>, <el_2>)
395395
```
396396

397397
### Attributes

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
<body>
5656
<header>
57-
<aside>January 25, 2022</aside>
57+
<aside>January 26, 2022</aside>
5858
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
5959
</header>
6060

@@ -364,8 +364,8 @@
364364
</code></pre></div>
365365

366366

367-
<div><h2 id="format"><a href="#format" name="format">#</a>Format</h2><pre><code class="python language-python hljs">&lt;str&gt; = <span class="hljs-string">f'<span class="hljs-subst">{&lt;el_1&gt;}</span>, <span class="hljs-subst">{&lt;el_2&gt;}</span>'</span> <span class="hljs-comment"># Or: '%s, %s' % (&lt;el_1&gt;, &lt;el_2&gt;)</span>
368-
&lt;str&gt; = <span class="hljs-string">'{}, {}'</span>.format(&lt;el_1&gt;, &lt;el_2&gt;) <span class="hljs-comment"># Or: '{0}, {1}'.format(&lt;el_1&gt;, &lt;el_2&gt;)</span>
367+
<div><h2 id="format"><a href="#format" name="format">#</a>Format</h2><pre><code class="python language-python hljs">&lt;str&gt; = <span class="hljs-string">f'<span class="hljs-subst">{&lt;el_1&gt;}</span>, <span class="hljs-subst">{&lt;el_2&gt;}</span>'</span>
368+
&lt;str&gt; = <span class="hljs-string">'{}, {}'</span>.format(&lt;el_1&gt;, &lt;el_2&gt;)
369369
</code></pre></div>
370370

371371
<div><h3 id="attributes">Attributes</h3><pre><code class="python language-python hljs"><span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> collections <span class="hljs-keyword">import</span> namedtuple
@@ -2881,7 +2881,7 @@
28812881

28822882

28832883
<footer>
2884-
<aside>January 25, 2022</aside>
2884+
<aside>January 26, 2022</aside>
28852885
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
28862886
</footer>
28872887

0 commit comments

Comments
 (0)