You are viewing a single comment's thread. Return to all comments →
test_cases = int(input()) strings = []
for _ in range(test_cases): strings.append(input())
for item in strings: even_index = item[0:len(item):2] odd_index = item[1:len(item):2] print(even_index,odd_index)
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Day 6: Let's Review
You are viewing a single comment's thread. Return to all comments →
test_cases = int(input()) strings = []
for _ in range(test_cases): strings.append(input())
for item in strings: even_index = item[0:len(item):2] odd_index = item[1:len(item):2] print(even_index,odd_index)