自学python也一年多了,写了有几个项目了,之前用strip也没翻过车,这次这个问题确实不太懂,请大神不吝赐教~
C:\Users\leiting>python34
Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 20:20:57) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> m = 'six.xlsx'
>>> n = m.rstrip('.xlsx')
>>> n
'si'
>>>
C:\Users\leiting>python34
Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 20:20:57) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> m = 'six.xlsx'
>>> n = m.rstrip('.xlsx')
>>> n
'si'
>>>