Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Print characters from a string that are present at an even index number

word = input('Enter word: ')
size = len(word)
for i in range(0, size, 2):
    print("index[", i, "]", word[i])
 
PREVIOUS NEXT
Tagged: #Print #characters #string #present #index #number
ADD COMMENT
Topic
Name
9+7 =