8015/multiple-line-comment-in-python
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.
Try this ''' This is a multiline comment. I can ...READ MORE
Try this ''' This is a multiline comment. ...READ MORE
Comments in Python begin with a # ...READ MORE
From Python Documentation: An except clause may name multiple ...READ MORE
Example of implicit line continuation: a = some_function( ...READ MORE
Firstly we will import pandas to read ...READ MORE
You can also use the random library's ...READ MORE
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
You can simply the built-in function in ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.