I was reading and i got these two terms and i am confused as in logical line it says "The end of a logical line is represented by the token NEWLINE". Newline means go to the next line which eventually ends the line.
And in physical line its written "A physical line is a sequence of characters terminated by an end-of-line sequence". so the same thing happens when we use newline with logical line. so what is the difference?
the link is 'https://docs.python.org/3.3/reference/lexical_analysis.html#logical-lines'
This is from the Python documentation regarding lexical analysis.
Here is one logical and physical line:
my_list = [1, 2, 3, 4]
Here is one logical line on two physical lines:
my_list = [1, 2,
3, 4]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With