string [] syntax python 3 code example
Example 1: [1::2] python
>>> L = range(10)
>>> L[::2]
[0, 2, 4, 6, 8]
Example 2: string template python
from string import Template
poem = Template('$x are red and $y are blue')
print(poem.substitute(x='roses', y='violets'))
#>>>roses are red and violets are blue