Python - Visit every second item in sequence via slice

Introduction

To visit every second character in S, for example, slice with a stride of 2:

Demo

S = 'abcdefghijk' 
for c in S[::2]: print(c, end=' ')

Result

Related Topic