Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära What is a String? | Data Types
Introduction to Data Analysis in Python
course content

Kursinnehåll

Introduction to Data Analysis in Python

Introduction to Data Analysis in Python

1. Basics
2. Data Types
3. Control Flow
4. Functions and Modules
5. Introduction to NumPy

book
What is a String?

In one of the first chapters, you learned how to make the Python output message "Hello, Python!". This message is called a string. In Python, strings represent textual data (may contain numbers too).

To store text in Python, you need to enclose it within quotation marks (single or double). For example, we can save the word Python within the language variable and output it.

1234
# Save string within variable language = 'Python' # Output string print(language)
copy

Note that using quotation marks is compulsory. If you don't use them, then the error will be raised.

##Task

Assign the course name ('Introduction to Python') to the course variable and output it.

question-icon

Fill in the blanks to complete the task.

# Create variable course

# Output course variable value
print(course)
Introduction to Python

Click or drag`n`drop items and fill in the blanks

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 3

Fråga AI

expand
ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

course content

Kursinnehåll

Introduction to Data Analysis in Python

Introduction to Data Analysis in Python

1. Basics
2. Data Types
3. Control Flow
4. Functions and Modules
5. Introduction to NumPy

book
What is a String?

In one of the first chapters, you learned how to make the Python output message "Hello, Python!". This message is called a string. In Python, strings represent textual data (may contain numbers too).

To store text in Python, you need to enclose it within quotation marks (single or double). For example, we can save the word Python within the language variable and output it.

1234
# Save string within variable language = 'Python' # Output string print(language)
copy

Note that using quotation marks is compulsory. If you don't use them, then the error will be raised.

##Task

Assign the course name ('Introduction to Python') to the course variable and output it.

question-icon

Fill in the blanks to complete the task.

# Create variable course

# Output course variable value
print(course)
Introduction to Python

Click or drag`n`drop items and fill in the blanks

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 3
Vi beklagar att något gick fel. Vad hände?
some-alt