Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Multiline Strings | Basic Concepts
String Manipulation in Python
セクション 1.  2
single

single

bookMultiline Strings

メニューを表示するにはスワイプしてください

What if we want to store some large text into one variable? By using large comparison, I mean text in multiple lines.

Fortunately, Python allows us to save multiple lines as one string. To do it, use tripled quotation marks. For example,

12345
# Creating three-lines string large_string = """Course: String Manipulation in Python Technology: Python Level: Beginner""" print(large_string)
copy

Note

Like in the previous chapter, you have to use the same quotation marks type (i.e. only single or double).

タスク

スワイプしてコーディングを開始

Assign to variable courses the following string (contains of 2 rows):

Introduction to Python

String Manipulation in Python

Then print this string into console.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  2
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt