Given a sequence of 2*k characters, please print every second character from the first half of the sequence. Start printing with the first character.
Input
In the first line of input your are given the positive integer t (1<=t<=100) - the number of test cases. In the each of the next t lines, you are given a sequence of 2*k (1<=k<=100) characters.
Output
For each of the test cases please please print every second character from the first half of a given sequence (the first character should appear).
Example
Input: 4 your progress is noticeable Output: y po i ntc
题意:给出一系列字符中,每个字符串中前半部分的每隔两个字符输出
代码如下
t = int(input())
for i in range(t):
s = input()
for j in range(0, int(len(s) / 2), 2):
print(s[j], sep='', end='')
print()