having a list like
lst = ['hello', 'stack', 'overflow', 'friends']
how can i do something like:
if there is not an element in lst starting with 'p=' return False else return True
?
i was thinking something like:
for i in lst:
if i.startswith('p=')
return True
but i can't add the return False inside the loop or it goes out at the first element.