How can the variable 'name' already be in a list if both list are blank?

I’m trying to understand how this for loop is ran in the background. The first line of the if statement indicates IF name is in "unique apps’ which is an empty list. At what point does this statement become TRUE?

Your question title seems to assume something must be in the list before it can be checked.
An empty list can be checked too. Checking for empty collection is a very common pattern, empty sets, dictionaries, lists all return boolean False. You can apply bool() over any object to see how it will behave in a if statement.
if re.match() is a common pattern too. The point is any object will have a boolean value. It’s the job of the programmer to set up this boolean behaviour to play well with if-else statements so the program both behaves correct and is easily reasoned by a human reading it (eg. negating everything sometimes works too but could be unreadable (De Morgan’s Law stuff)).

It becomes true, when unique_apps contains that name. It contains that name because some earlier iteration of the loop went into else clause to append it there. It went else clause because if was false. Basically, every 1st appearance of any name will flow down else path, every 2nd or later appearance of name goes down if path.

Hanqi - thank you so much for this explanation. You cleared up my confusion.