Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to print out even index in python

T = list(input().split())
for j in T:
    a = ""
    b = ""
    for i in range(0,len(j)):
        if i%2 == 0:
            a = a+j[i]
        else :
            b = b + j[i]
    print(a+" "+b)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #print #index #python
ADD COMMENT
Topic
Name
1+7 =