What happens if I write a comment over more than 1 lines?

I have read that “The # character is used to start a comment and it continues until the end of the line.” So what happens if my comment continues unto a new line? Also, in the lesson linked below some of the examples of comments are extend beyond more than one line, I’m confused.

https://www.codecademy.com/paths/computer-science/tracks/cspath-intro/modules/cspath-python-syntax/lessons/learn-python-syntax/exercises/comments

I’d guess that the ‘new lines’ are actually just the text wrapping used by that text environment. Does the actual line number change? End of line would really be referring to the non-rendered character which ends the line- i.e. returns, newlines and such.

# This one is just a really really really really really really really really really really really really really really really really really really really really long comment. There's no text wrapping here.
# A shorter comment.
# This is another comment but...
this is not  # and would throw an error when parsed.

The line number does not change. So, if the line number does not change the text is wrapped.

# I would like to write a program that squares numbers. To do this I will need to make use of the exponentiation symbol.
          # and would throw an error. What then happens when you go over the line, well nothing. 

why would this throw an error?

Because everything written before the comment would be treated as if it was part of the code but it is not valid syntax so the code wouldn’t even get to run (error thown before execution).

To conclude, a comment where the text is wrapped is treated as a single line comment. Are ‘new lines’ always text wrapped? If this were not so would an error be thrown?

It depends what devlopment environment you’re using; as far as the actual file is concerned there is only one line. Text wrapping is just rendering the text in that particular way for the sake of the user (as are new lines for that matter).

A lot of IDEs don’t use text wrapping by default since it can cause a little confusion sometimes but you’d have a very hard time without text wrapping if you were using a large font or a small screen or both.