Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
zip(q, q) solution in Clear category for Find Quotes by veky
import contextlib
def quotes(string):
with contextlib.suppress(ValueError):
pos = string.index('"')
while ...:
yield pos
pos = string.index('"', pos+1)
def find_quotes(a):
q = quotes(a)
for open, close in zip(q, q):
yield a[open+1 : close]
Feb. 7, 2019
Comments: