• + 1 comment

    Great solution! It's clean. I initially used a loop before learning about slicing

    num_strings = int(input().strip())
    for i in range(num_strings):
        S = input().strip()
        N = len(S)
        even_chars = ""
        odd_chars = ""
        for x in range(N):
            if x % 2 == 0:
                even_chars += S[x]
            else:
                odd_chars += S[x]
        print(f"{even_chars} {odd_chars}")