- 1
How to write comments in Python?
You can use the quick access method to comment on several lines
3 Answers
+ 2
Have a google search :)
+ 2
Use hashtag(#) for single line comments. Everything after (#) will be commented.
Or use triple quotes(''' ''') for commenting multiple lines.
like this:
'''
import math
print(math.sqrt(25))
'''
Here this code won't run because it is inside triple quotes.
0
Check the short cut options of your editor.
You need to select the lines before you press the short cut.