Re: [Tutor] How does slicing work?

2012-06-16 Thread Kanone Seele
Thank you guys~ the two blades method really works well! And I think it'd be better to dive into the source code of Pytho.Well,it seems difficult for me now. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://ma

[Tutor] How does slicing work?

2012-06-15 Thread Kanone Seele
Hello,I'm a beginner in python.I found some qustions in Chapter 9's Quiz of the book* Learning Python,4th ed*, >>> L = [1, 2, 3, 4] >>> L[-1000:100] [1, 2, 3, 4] >>> L[3:1] [] >>> L[3:1] = ['?'] >>> L [1, 2, 3, '?', 4] How does python get the result of slicing?Such as the examples above,t