在输入的字符串中提取其中的姓名与职业信息,建立姓名职业字典并按键的顺序排列后输出,寻找其中职业字符串长度最长的条目(假设最长的只有一个)输出。 输入的字符串的格式形如(格式如下,逗号间隔,最后句号): Kim is a bookkeeper, Kate is an actress, Bartholomew is a barber. 输出: [('Bartholomew', 'barber'), ('Kate', 'actress'), ('Kim', 'bookkeeper')] ('Kim', 'bookkeeper')