Python in even letters in the string
Aug 13, 2025
a = ‘sowmi’
for i in range(len(a)):
if i % 2 == 0:
print(a[i])
Get Codefile’s stories in your inbox
Join Medium for free to get updates from this writer.
Python in even letters in the string in build-in function
a = ‘sowmi’
print(a[::2]) # start at 0, go to end, step by 2



