Flowchart On First and Last Character in String in Python