<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>f-string Archives - Huahua&#039;s Tech Road</title>
	<atom:link href="https://zxi.mytechroad.com/blog/tag/f-string/feed/" rel="self" type="application/rss+xml" />
	<link>https://zxi.mytechroad.com/blog/tag/f-string/</link>
	<description></description>
	<lastBuildDate>Wed, 20 May 2020 04:38:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.0.8</generator>

<image>
	<url>https://zxi.mytechroad.com/blog/wp-content/uploads/2017/09/cropped-photo-32x32.jpg</url>
	<title>f-string Archives - Huahua&#039;s Tech Road</title>
	<link>https://zxi.mytechroad.com/blog/tag/f-string/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>f-String in Python3</title>
		<link>https://zxi.mytechroad.com/blog/python/f-string-in-python3/</link>
					<comments>https://zxi.mytechroad.com/blog/python/f-string-in-python3/#respond</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Wed, 20 May 2020 04:35:48 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[f-string]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">https://zxi.mytechroad.com/blog/?p=6801</guid>

					<description><![CDATA[<p>[crayon-6638a00b624ce434996679/]</p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/python/f-string-in-python3/">f-String in Python3</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="f-String - Python3 字符串格式化利器" width="500" height="375" src="https://www.youtube.com/embed/dwCeM1HNo5Y?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div></figure>



<div class="responsive-tabs">
<h2 class="tabtitle">Example code</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">name = 'Huahua'
score = 123.456789

print('name = ' + name + ', score = ' + str(score))
print('name = %s, score = %.3f' % (name, score))
print('name = {name}, score = {score:.3f}'.format(name=name, score=score))
print('name = {name}, score = {score:.3f}'.format(name='Huahua', score=123.456789))

print(f'name = {name}, score = {score:.3f}') # Python 3.6
print(f'{name = }, {score = :.3f}') # Python 3.8

def add(a, b):
  return a + b

k = 1
print(f'{k = }, {add(k, 2) = }') # k = 1, add(k, 2) = 3</pre>
</div></div>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/python/f-string-in-python3/">f-String in Python3</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zxi.mytechroad.com/blog/python/f-string-in-python3/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
