Python notes cleaning