I'm studying Python 3. Recently I've started to use HackerHank, and there I found a solution to a certain challenge that I had not completed. However, I didn't understand some of the lines of code.
This is the code:
import statistics;
n = int(input())
x = list(map(int, input().split()))
x = sorted(x);
median = statistics.median(x)
L = (i for i in x if i < median)
U = (i for i in x if i > median)
These are the two lines that are confusing me:
L = (i for i in x if i < median)
U = (i for i in x if i > median)