How do I write both short and long names in a single list comprehension line?
#this is how i tried below code but its not working.
short_names, long_names = [(i,j) for i,j in planet_names if len(i) <= 5
else len(j) > 5 ]
#working code
planet_names = ["Mercury", "Venus", "Earth", "Mars", "Jupiter","Saturn"]
short_names = [i for i in planet_names if len(i) <= 5]
long_names = [i for i in planet_names if len(i) > 5]