Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda What Is a String? | Strings
Introduction to Python | Mobile-Friendly
course content

Conteúdo do Curso

Introduction to Python | Mobile-Friendly

Introduction to Python | Mobile-Friendly

1. Python Basics
2. Variables
3. Strings

book
What Is a String?

In the first chapter, you learned how to make Python output the message "Hello, Python!". This message is called a string. In Python, strings represent textual data (they 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 an error will be raised.

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

Clique ou arraste solte itens e preencha os espaços

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 1
Sentimos muito que algo saiu errado. O que aconteceu?
some-alt