I'm writing a program that plays War the card game. Each player has a set of cards, and I've gotten it to deal randomly fine. I need it to be able to compare two values in the list and do something depending on their integer values. I've written the code as follows:

```
from random import *
def main():
    cards = [1,2,3,4,5,6,7,8,9,10,11,12]*4
    p1 = []
    p2 = []
    while len(cards) != 0:
        m = randint(0,len(cards))
        p1.append(cards[m-1])
        del cards[m-1]
        n = randint(0,len(cards))
        p2.append(cards[n-1])
        del cards[n-1]
    print(p1, p2)
    def game():
        if p1[0] > p2[0]:
            p1.append(p2[0])
            del p2[0]
        elif p2[0] > p1[0]:
            p2.append(p1[0])
            del p1[0]
        else:
            if len(p1) > len(p2):
                print(p1, p2)
                for i in range(1,len(p2)):
                    if int(p1[i]) > int(p2[i]):
                        p1.append(p2[0:i])
                        del p2[0:i]
                    if int(p2[i]) > int(p1[i]):
                        p2.append(p1[0:i])
                        del p1[0:i]
                    else:
                        continue
            else:
                print(p1, p2)
                for i in range(1,len(p2)):
                    if int(p1[i]) > int(p2[i]):
                        p1.append(p2[0:i])
                        del p2[0:i]
                    if int(p2[i]) > int(p1[i]):
                        p2.append(p1[0:i])
                        del p1[0:i]
                    else:
                        continue
    while len(p1) > 0 and len(p2) > 0:
         game()
    print("player 1 has", p1, " and player 2 has ", p2)
    if len(p1) == 0:
        print("Player 2 wins")
    elif len(p2) == 0:
        print("Player 1 wins")
    input("Press enter to exit")

```

But each time I run it it plays fine until it gets a tie. As soon as it's comparing any values other than the first two it prints this error:

```
Traceback (most recent call last):
  File "<pyshell#12>", line 1, in <module>
    main()
  File "C:\Users\Jesse\Documents\Jesse\homework\Computer Science\Programs\War.py", line       52, in main
    game()
  File "C:\Users\Jesse\Documents\Jesse\homework\Computer Science\Programs\War.py", line      32, in game
     if p1[i] > p2[i]:
 TypeError: unorderable types: int() > list()

```

What does this mean? And what is the difference between comparing the first two and any other two?