str_arr = input()
d = "}, "
for line in str_arr:
new_str = [e + '},' for e in str_arr.split(d) if e]
print(len(new_str))
for i in new_str:
print(i)
I want my code to accept a list of dictionaries but the input is a string and tried to make the input str_list to a list but my code adds }, at the end of the console output how can I remove it.