核心概念:encode()方法Python3中,字符串(str类型)是默认的Unicode字符串,要将其转换为另一种编码(如ASCII),你需要使用encode()方法,str.encode(encoding='utf-8...