列表-切片
>>> rhyme =>>> print(rhyme)
>>> for each in rhyme:
... print(each)
...
1
2
3
4
5
上山打老虎
>>> rhyme
1
>>> rhyme
'上山打老虎'
>>> rhyme[-1]
'上山打老虎'
>>> rhyme
>>> rhyme
>>> rhyme[:3]
>>> rhyme
>>> rhyme[:]
>>> rhyme
>>> rhyme[::2]
>>> rhyme[::-2]
['上山打老虎', 4, 2]
>>> rhyme[::-1]
['上山打老虎', 5, 4, 3, 2, 1]
页:
[1]