String slicing requires output formatting in Python

terry73

New member
I'm a Python newbie, and I've written some code that should slice text evenly and weirdly and show it.
This is my code:
Code:
def even_bits(str):
    result = "" 
    for i in range(len(str)):
        if i % 2 == 0:
            result = result + str[i]
    return result
def odd_bits(str):
    result = "" 
    for i in range(len(str)):
        if i % 2 == 1:
            result = result + str[i]
    return result


for i in range(int(input())):
    w = input('')   
    print(even_bits(w), ' ' ,odd_bits(w))
This works perfectly, however the result is as follows:
Code:
Sample Input:
2
Hello
World

Sample Output:
2
Hello
Hlo el

World
Wrd ol
How do I format the output such that it looks like this:
Code:
Sample Output:
Hlo el
Wrd ol
I'm still learning how to use the string-slicing function for resources like this, so I was hesitant to use it.
Thank you ahead of time.