A pyramid!

Report a typo

Print a four-line string that includes:

  1. One single quote;
  2. One single quote, one double quote, and one single quote;
  3. Five alternating single and double quotes, starting with a single quote;
  4. Seven alternating single and double quotes, starting with a single quote.

Your output should look like this:

'
'"'
'"'"'
'"'"'"'

To make the task easier, start your string with three pairs of double quotes to indicate the beginning and the end of your string. In this case, you don't have to use escaping.

Write a program in Python 3
print(...)
___

Create a free account to access the full topic