Q:

Two sets of similar python code seem to act differently

Trying to figure out why I'm getting two different results here (one that is an error).  Here is the code that runs:
hta = 2.13
visitor_team_ratings = [21.53]
home_team_ratings = [None]
difference = []

for a, b in zip(visitor_team_ratings, home_team_ratings):
    if a and b:
        difference.append(a - (b + float(hta)))
    else:
        difference.append('NO RATING')
print(difference)

This prints out "NO RATING" but I'm hard pressed to understand why it does that.  None isn't the same thing as an empty list so why is python dropping down to the else statement.
Here is similar code that throws an error.  Same variables/list as the working code above:
if visitor_team_ratings and home_team_ratings:
    difference.append((visitor_team_ratings[0] - (home_team_ratings[0] + float(hta))))
else:
    difference.append('NO RATING')
print(difference)

The error is: TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'
I'm not sure I understand why one works and one doesn't.  And the one that does work, I'm not even sure I understand why it does that.  I've been using that 1st code block in my program for a while...

A:

In if visitor_team_ratings and home_team_ratings:̀  you look at the lists.
Whereas if you use: if visitor_team_ratings[0] and home_team_ratings[0]:. Then you look at the element inside the lists. (Which correspond to a and b of your first block)
edit I should elaborate more:
home_team_ratings = [None]

This is the cause of your problem. If you look at the element, it's None so the condition won't be True. But if you look at the list, then your if will be True since both lists are not empty. But right after home_team_ratings[0]: will give an error since it's None.

