返回顶部

收藏

An index that is too large is replaced by the string size

更多
word = 'Help' + 'A'
print word[:2]    # The first two characters
print word[2:]    # All but the first two characters

print word[1:100]
print word[10:]
print word[2:1]

标签:Python,String

收藏

0人收藏

支持

0

反对

0

发表评论