I would like to get an array slice that has two (or more) discontiguous parts.
Example:
>>> a=range(100)
>>> a[78:80; 85:97] # <= invalid syntax
[78, 79, 85, 86]
That syntax is not accepted. What's the best way to do it?
UPDATE: Above example was on int, but I'd primarily like this to work on strings.
Example:
>>> a="a b c d e f g".split()
>>> a[1:3; 4:6]
['b', 'c', 'e', 'f']