Reversing a list using slice notation

后端 未结 8 1913
忘掉有多难
忘掉有多难 2020-11-28 22:49

in the following example:

foo = [\'red\', \'white\', \'blue\', 1, 2, 3]

where: foo[0:6:1] will print all elements in foo. Howe

8条回答
提交回复
热议问题