O GoConqr está de visual novo! Conte para nós o que você achou.

Módulo 9 de 24 · Texto

Coding strings

David Khieu

Coding strings

Now the next question is: how do you embed an apostrophe into a string placed between apostrophes? 

You should already know the answer, or to be precise, two possible answers. 

Try to print out a string containing the following message: 

I'm Monty Python. 

Do you know how to do it? Click Check below to see if you were right: 

print('I\'m Monty Python.')

or

print("I'm Monty Python.")

As you can see, the backslash is a very powerful tool - it can escape not only quotes, but also apostrophes. 

We've shown it already, but we want to emphasize this phenomenon once more - a string can be empty - it may contain no characters at all. 

An empty string still remains a string: 

' '
" " 

Instruções

Para avançar no curso, envie uma tentativa deste quiz. Você pode enviá-la depois da última pergunta.

Ir para o módulo escolhido

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?