Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (((x12 & x20) & x05) | x02) | ((x12 & x13)) | (x13 | x20)
- import re
- string = '(((x12 & x20) & x05) | x02) | ((x12 & x13)) | (x13 | x20)'
- result = re.findall('(([^(].*?))', string)
- # --> ['x12 & x20', 'x12 & x13', 'x13 | x20']
- print('({})'.format(result[0]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement