How to comment out a block of code in Python?
How do I comment out a block of code in Python?
Literally everyone I've asked said CTRL + Shift + 7 (CTRL + "/"). I've even it on this website, Reddit and Stackoverflow but it just doesn't work on my end. I've asked several people and no one else has this issue. It's literally three buttons and I've spent hours trying to figure this out and it's driving me insane at this point.
I'm on Chrome - Windows 10.
It's not my keyboard. I've tried my own keyboard, a USB one and the On-screen one in Windows. None of them work.
Help?
It's simple just do #[your text/code here]
Or you can use
''' [your code/text here for multiple lines] '''
@svensk007 That's not even the question, so if you're to tell me that the problem I've been trying to solve for hours is simple, the least you can do is address the problem itself.
@sorenn dude that is exactly what(it seems) you asked. maybe you could clarify it a bit further?
@BooleanBean @svensk007 I'm asking how to comment out multiple lines (a block) of code at once.
Commenting out one line or creating a string was never the question.
@sorenn then just put three 's to start and stop the commenting.
hmm
well it won't hurt to just manually comment it out with a multiline string
''' def ohno(): print("eeeeee") '''
Why doesn't ctrl + /
work for you?
@DynamicSquid I wish I knew. When I do it, nothing happens.
@sorenn Works perfectly for me? Try submitting a bug request.
@DynamicSquid When did you become a mod?
@IntellectualGuy 9 hours ago :)
@DynamicSquid Gud, you deserve it
@IntellectualGuy Thanks!
@DynamicSquid - on my keyboard it is the /? button
@sorenn I have the samt problem, and have as you I think a swedish keyboard. If i change to US keyboard in windows, I can use ctrl + (the minus and underscore key).
Weird!