How to comment multiple lines in Python

+1 vote
May 24, 2019 in Python by Wajiha
• 1,960 points
1,147 views

1 answer to this question.

0 votes
Comments in Python begin with a # tag. If you have 2 or more lines,  each line needs to be prefixed by a hash.  The shortcut method to do  this is just hold the ctrl key and left click in front of every line you want to comment and press # just once and it will appear on al the selected places.
answered May 24, 2019 by Nisa
• 180 points

Related Questions In Python

0 votes
1 answer

How to transfer multiple lines in a file using python?

Hi@akhtar, I don't know it will help you ...READ MORE

answered Mar 31, 2020 in Python by MD
• 95,460 points
1,172 views
+3 votes
5 answers

How to read multiple data files in python

Firstly we will import pandas to read ...READ MORE

answered Apr 6, 2018 in Python by DeepCoder786
• 1,720 points
15,326 views
0 votes
0 answers

How to read lines from compressed text files in Python

Is it easy to read a line ...READ MORE

Dec 27, 2018 in Python by Anirudh
• 2,090 points
981 views
0 votes
0 answers

How to implement multiple try codes in a single block using Python?

Hi all, As per the title, I am ...READ MORE

Jan 14, 2019 in Python by Anirudh
• 2,090 points
706 views
0 votes
1 answer

How to extract specific tags in multiple html .txt files using python.

Hello, @Pooja, Even I got the same issue, ...READ MORE

answered Aug 5, 2020 in Python by Kedaar Thomas
5,354 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,464 views
0 votes
1 answer
0 votes
1 answer

How to install Python on Windows and set path variable?

Install python from this link https://www.python.org/downloads/ After ...READ MORE

answered May 24, 2019 in Python by anonymous
• 180 points
2,725 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP