Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Python :: python find center of polygon function 
Python :: 231a codeforces solution in python 
Python :: python round 1 decimal place 
Python :: download unsplash images 
Python :: max between two numbers python 
Python :: eval function in python 
Python :: pd.datetimeindex 
Python :: create column with values mapped from another column python 
Python :: how to add labels on bar of barchart seaborn 
Python :: liste compréhension python 
Python :: beautifulsoup 
Python :: pandas to python datetime 
Python :: how to read .xlsx file in python 
Python :: matrix multiplication nupy 
Python :: program to add first and last digit of a number in python 
Python :: copy dataframe columns names 
Python :: datetime.timedelta format to string python 
Python :: Display an image over another image at a particular co-ordinates in openCV 
Python :: getting size of list in python 
Python :: flask send email gmail 
Python :: hide turtle 
Python :: torch print full tensor 
Python :: file storage django 
Python :: flask where to put db.create_all 
Python :: modify a list with for loop function in python 
Python :: python oauthlib 
Python :: np ignore divide by zero seterr 
Python :: pip change python version 
Python :: python doctype 
Python :: python seaborn violin plot 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =