Post Reply 
list slicing question
11-24-2022, 11:32 AM
Post: #3
RE: list slicing question
(11-24-2022 12:04 AM)Albert Chan Wrote:  By trial and error, this seems to work, but weird, with 1 = beyond end-of-list

At least it is consistently weird, for 0-based XCas, 0 = beyond end-of list

XCas> range(7)[0:0:2]      → [0,2,4,6]
XCas> range(7)[1:0:2]      → [1,3,5]
XCas> range(7)[2:0:2]      → [2,4,6]
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
list slicing question - Albert Chan - 11-23-2022, 02:55 PM
RE: list slicing question - Albert Chan - 11-24-2022, 12:04 AM
RE: list slicing question - Albert Chan - 11-24-2022 11:32 AM



User(s) browsing this thread: 1 Guest(s)