I am converting python lists to tcl lists using "to_tcl" function (own code). I I want to iterate through all lists in Python (Pat 1, Pat 2, ... Pat 4) and convert it to tcl lists (Pat1_tcl, Pat2_tcl, ..., Pat4_tcl) using the function however I get an error in inserting the number (count) in the Pat%d{count}_tcl} = to_tcl(Pat%d{count}) line. How do I properly format the %d integer part?
count = 0
while count < 5:
Pat{%dcount}_tcl} = to_tcl(Pat{%dcount})
print(Pat{count}_tcl)
count += 1