# Issue

This Content is from Stack Overflow. Question asked by brucey

Link to question: https://www.spoj.com/UTPEST22/problems/UTP_Q2/
From what I understand, the question is divided into 2 parts:

1. Input
• The first input is an integer that limits the number of time the user can provide a set of integers.
• From the second line onwards, the user provides the sequence of integers up until the specified limit.
• The set of integers are arranged in ascending order, separated only by a space each.
1. Output
• For each sequence of integers, the integers in it are looped over. Only those that are even are printed as outputs horizontally.
``````from sys import stdin

for x in range(1, 1+ int(input())):
# number of cases, number of times the user is allowed to provide input

for line in stdin:
num_list = line.split()
# remove the space in between the integers
num = [eval(i) for i in num_list]
# change the list of numbers into integers each

for numbers in range(num, num[-1] + 1):
# the first integer is the lower bound
# the second the upper bound
if numbers % 2 == 0:
# modulo operation to check whether are the integers fully divisible
print(numbers, end = ' ')
# print only the even numbers, horizantally
``````

Can anyone please provide some insights on how to make changes to my code, specifically the loop. I felt so messed up with it. Screenshot of the result.

Any help will be appreciated.

```