Use the
len function to find out how long a list is. e.g.
(You can also do len(x) == 0, which is equivalent to x == [])
Or, you could do it thus:
if highlights == []:
# highlights doesn't exist
else:
# highlights does exist Look up the difference between "else" and "elif".