Conteúdo do Curso
Introduction to Data Analysis in Python
Introduction to Data Analysis in Python
Multiline Strings
If you need to store more than 1 line of text within one variable, you will need to enclose it with a pair of Triple quotes.
Another option is to use the newline characters (\n
). In this case, you will not need to use pair of Triple quotes.
string_1 = ''' Strings are easy ''' # or string_2 = 'Strings\nare easy' print(string_1) print(string_2)
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 2. Capítulo 4