Closed
Description
概要
大したミスではないですが、
'"Isn\'t," they said.' の出力結果を誤って
'"Isn\'t," they said.' と掲示しています。
問題のある箇所 (URLで指定すること)
Python チュートリアル 3. 形式ばらない Python の紹介 3.1.2. テキスト
問題の詳細
3.1.2. テキスト
Python は数値だけでなくテキスト
(中略)
クォートの中でクォートを使いたい場合、 \ を前に付け加えることで「エスケープ」をする必要があります。 もしくは、文字列で使用したいクォートとは別の方のクォートで囲むこともできます。
'doesn\'t' # \' を使用してシングルクォートをエスケープする
"doesn't"
"doesn't" # または代わりにダブルクォートを使用する
"doesn't"
'"Yes," they said.'
'"Yes," they said.'
"\"Yes,\" they said."
'"Yes," they said.'
ここまでは問題ないのですが、以下の説明に誤りがあります。
'"Isn\'t," they said.'
'"Isn\'t," they said.'
修正案
'"Isn\'t," they said.'
'"Isn\'t," they said.'
から
'"Isn\'t," they said.'
'"Isn't," they said.'
へ変更する
Metadata
Metadata
Assignees
Labels
No labels