0
0 комментариев

Доброе!

Пытаюсь решить задачку:
A backslash is used to escape a quote so it can be used in strings such as ‘It\’s me’ and «She said \»Hello\»». The special symbol ‘\n’ is used to add a line break to a string. Print out this text using one string: The name of this ice-cream is «Sweeet’n’Tasty»

Исходник:

dont_worry = "Don't worry about apostrophes"
print(dont_worry)
print("The name of this ice-cream is \"Sweeet\"")
print('text')

Мое решение неправильное:

dont_worry = "Don't worry about apostrophes"
print(dont_worry)
print("The name of this ice-cream is \"Sweeet\'n\'Tasty\"")
print('Tasty')

Как объединить две строки?
Спасибо.


Добавить комментарий