Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>> 
>>> s='xiaodeng'
>>> s[-1]
'g'
>>> s[len(s)-1]
'g'
>>> s[-2]
'n'
>>> s[len(s)-2]
'n'
>>> 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
  • 2022-12-23
  • 2021-06-21
  • 2022-02-15
  • 2022-12-23
  • 2021-12-27
猜你喜欢
  • 2021-05-04
  • 2022-12-23
  • 2022-12-23
  • 2021-04-10
  • 2021-11-11
  • 2021-07-18
  • 2021-11-12
相关资源
相似解决方案