brackets = {')', '(', '{', '}', '[', '>', ']', '<'}
string_line = <[2{12.5 6.0}](3 -4 5)>'
Basically I have to add space around any brackets in a string_line for brackets that are in the set. e.g. '[' becomes ' [ ' Assuming that I wouldn't know what brackets it contains, how can i avoid repeating line.replace 8 times? (there are 8 types of brackets)
Thanks!