This simple code that simply tries to replace semicolons (at i-specified postions) by colons does not work:
for i in range(0,len(line)): if (line[i]==\"
If you are replacing by an index value specified in variable 'n', then try the below:
def missing_char(str, n): str=str.replace(str[n],":") return str