def trim(line):
    if not '#' in line:
        return line
    return line.split('#')[0]
Remove everything following comment # characters in line.
dataset/ETHPy150Open sympy/sympy/sympy/physics/quantum/qasm.py/trim