There is seems to be something wrong with this example:
item = [x**2 if x %2 == 0 for x in range(10)] But I can write like that:
item = [x**2 if x % 2 == 0 else x**3 for x in range(10)] Or:
item = [x**2 for x in range(10) if x % 2 == 0] How important is the order here and why I can't use 'if' without 'else' in the first example?