Strip comments from a string: Difference between revisions
→Functional Python: Pylinted and added {works with} tag
m (→Functional) |
(→Functional Python: Pylinted and added {works with} tag) |
||
Line 1,352:
We can specify the line prefixes to retain in terms of '''itertools.takewhile''',
which is defined over strings as well as lists.
{{Works with|Python|3.7}}
<lang python>'''Comments stripped with itertools.takewhile'''
|