line = "abcde"line[:-1]结果为:'abcd' line = "abcde"line[::-1]结果为:'edcba' line[:-1]其实就是去除了这行文本的最后一个字符(换行符)后剩下的部分。 问题不难,但是 还是要Maker 一下。