How to use 'python comment multiple lines' in Python

Every line of 'python comment multiple lines' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
182def reindentComment(self, stc, ln, dedent_only):
183 cursor = stc.GetCurrentPos()
184 fc = stc.PositionFromLine(ln)
185 lc = stc.GetLineEndPosition(ln)
186 text = stc.GetTextRange(fc, lc)
187 count = len(text)
188 pos = 0
189 while pos < count and text[pos] == ' ':
190 pos += 1
191 stc.SetTargetStart(fc)
192 stc.SetTargetEnd(lc)
193 stc.ReplaceTarget(text[pos:count])
194 cursor -= pos
195 return cursor
152def comment(s):
153 out = str()
154 for line in s.splitlines():
155 out += '% ' + line + '\n'
156 return out

Related snippets