On Thu, 31 Dec 2015 10:18:52 -0800, otaksoftspamtrap wrote:

> Best to use re and how? Something else?

Split the string on the space character and check the first two non blank 
elements of the resulting list?

Maybe something similar to the following:

if [x for x in s.split(' ') if x != ''][0:3] == ['(', '(', '(']:
    # string starts '((('

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to