prog = '+++.' memory = 0 for i in prog: if i=='+': memory += 1 if i=='.': print memory #TODO: Make the rest