I have problem with compare string with '{' sign. I used incrementation to go forward through string and if function find '{' or '}' should add sign to list. Unfortunately, the output is "IndexError: string index out of range". Do you have ideas how to do this?
while i <= len(summary):
    if summary[i] == '{':
        nws_otw.append(summary[i])
    if summary[i] == '}':
        nws_zam.append(summary[i])
    i+=1
 
     
    