This is what I was trying to do (I think), in pretty much the way I was trying to do it:
from random import randint
random_list = []
while len(random_list) <= 20:
random_no = randint(0,20)
Unique = True
for entry in random_list:
if random_no == entry:
Unique = False
if Unique == True:
random_list.append(random_no)
print random_list
raw_input()
Yes, there are better ways to do it which have already been mentioned, but this one fits my weird criteria. Sorry if someone already posted something essentially the same as this and I missed it.