Add hint for 'loop is not defined' error

Only covering Python for now.