On 6/15/2012 7:48 PM Kanone Seele said...
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,they really confused me.




There's some good examples at:

http://stackoverflow.com/questions/509211/good-primer-for-python-slice-notation

HTH,

Emile


_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to