<?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>改行なし - プログラミングで遊ブログ</title>
	<atom:link href="https://lemon818.com/tag/%E6%94%B9%E8%A1%8C%E3%81%AA%E3%81%97/feed/" rel="self" type="application/rss+xml" />
	<link>https://lemon818.com</link>
	<description>現役システムエンジニアが趣味でプログラミングする自由気ままなブログ</description>
	<lastBuildDate>Mon, 03 Aug 2020 08:44:57 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/>	<item>
		<title>【Python】print を改行なしで表示するには「end =&quot;&quot;」を設定しよう！</title>
		<link>https://lemon818.com/python-print/</link>
		
		<dc:creator><![CDATA[Take]]></dc:creator>
		<pubDate>Mon, 03 Aug 2020 08:41:37 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[end]]></category>
		<category><![CDATA[print]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[オプション引数]]></category>
		<category><![CDATA[改行なし]]></category>
		<guid isPermaLink="false">https://lemon818.com/?p=5295</guid>

					<description><![CDATA[Python の print を改行なしで表示させたい！ &#160; どーもTakeです。 そんな思いから Python の「print」を改行なしで表示させる方法について簡単に解説します。 &#160; とはいっても…]]></description>
										<content:encoded><![CDATA[<div class="sc_frame_wrap solid yellow">
<div class="sc_frame "><span style="color: #000000;"><b>Python の print を改行なしで表示させたい！</b></span></div>
</div>
<p>&nbsp;</p>
<p>どーもTakeです。</p>
<p>そんな思いから Python の<strong>「print」を改行なしで表示させる方法</strong>について簡単に解説します。</p>
<p>&nbsp;</p>
<p>とはいっても<strong>タイトルで答えを言ってる</strong>んですが、</p>
<p><span style="color: #0000ff;"><strong>「print」の end というオプション引数を使えば、</strong></span>改行なしで表示させることが可能です。</p>
<p>&nbsp;</p>
<p>この記事では、print のオプション引数 end について説明します！</p>
<p>&nbsp;</p>
<h2>Python の「print」を<strong>改行なしで表示させる方法</strong></h2>
<p>「print」を改行なしで表示させるには、<span style="color: #0000ff;"><strong>「print」のオプション引数 end='' と指定すれば可能です。</strong></span></p>
<p>&nbsp;</p>
<p>まずは print「<strong>改行あり</strong>」からソースコードで示します。</p><pre class="crayon-plain-tag">print('test1')
print('test2')

## 実行結果
test1
test2</pre><p>
&nbsp;</p>
<p>上記は print の普通の使い方だと思います。</p>
<p>続いて「<strong>改行なし</strong>」のソースコードを表示させる方法です。</p><pre class="crayon-plain-tag">print('test1',end='')
print('test2',end='')

## 実行結果
test1test2</pre><p>
&nbsp;</p>
<p>上記のように print のオプション引数として「end = ''」と指定すれば<strong>改行なしで表示させること</strong>が可能です。</p>
<p>&nbsp;</p>
<p>オプション引数 end は print で表示させる値の<strong>末尾の値を指定</strong>することができます。</p>
<p>たとえば「\n」や「\r\n」のような<strong>改行コードを指定することも可能</strong>ですし、「123」のように<strong>好きな値を末尾に指定することも可能</strong>です。</p><pre class="crayon-plain-tag">print('test1',end='\r\n')
print('test1',end='\n')
print('test3',end='123')
print('test4')
## 実行結果
test1
test2
test3123test4</pre><p>
&nbsp;</p>
<h2>最後に</h2>
<p>いかがでしたでしょうか？</p>
<p>この記事では、Python の「print」メソッドを改行なしで表示させる方法について解説しました。</p>
<p>&nbsp;</p>
<p>この記事が読者の Python 開発のお役に立てれば幸いです。</p>
<p>ではでは。</p>
<p>&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
