6 lines
115 B
Python
6 lines
115 B
Python
|
|
import re
|
||
|
|
|
||
|
|
m = re.match(r'^([^#]*)#(.*)$', line)
|
||
|
|
if m: # The line contains a hash / comment
|
||
|
|
line = m.group(1)
|