I know how to add single line comment but what if I want to comment the whole block of code. Do I need to add # in front of each line?
No, you can simply use triple codes for multi-line comments. For example:
This is my piece of code.
and you can write anything in between.
This is a multiline
comment. I can ...READ MORE
''' This is a multiline comment. ...READ MORE
Firstly we will import pandas to read ...READ MORE
You can use '\n' for a next ...READ MORE
The correct, fully Pythonic way to read ...READ MORE
''' This is a multiline comment. I ...READ MORE
if you google it you can find. ...READ MORE
suppose you have a list
a = [0,1,2,3,4,5,6,7,8,9,10]
now ...READ MORE
can you give an example using a ...READ MORE
You can simply the built-in function in ...READ MORE