1# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com 2# 3# Python test originally created or extracted from other peoples work. The 4# parts from me are licensed as below. It is at least Free Software where 5# it's copied from other people. In these cases, that will normally be 6# indicated. 7# 8# Licensed under the Apache License, Version 2.0 (the "License"); 9# you may not use this file except in compliance with the License. 10# You may obtain a copy of the License at 11# 12# http://www.apache.org/licenses/LICENSE-2.0 13# 14# Unless required by applicable law or agreed to in writing, software 15# distributed under the License is distributed on an "AS IS" BASIS, 16# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17# See the License for the specific language governing permissions and 18# limitations under the License. 19# 20 21print( (1,2,3)[1] ) 22print( (1,2,3)[1:] ) 23print( (1,2,3)[:2] ) 24print( (1,2,3)[:] ) 25print( (1,2,3)[1:2] ) 26print( (1,2,3,4,5,6)[1::2]) 27print( (1,2,3,4,5,6)[4::-2]) 28print( (1,2,3,4,5,6)[-1]) 29print( (1,2,3,4,5,6)[-3:]) 30print( (1,2,3,4,5,6)[:-1]) 31print( (1,2,3,4,5,6)[::]) 32print( (1,2,3,4,5,6)[-3:-1]) 33print( (1,2,3,4,5,6)[:-1:2]) 34print( (1,2,3,4,5,6)[-1::-2]) 35print( (1,2,3,4,5,6)[slice(-1,None,-2)]) 36