looping for lists of 4, but lists of three is showing up in my list

Viewed 31

here is the example code, when I run it I am still getting lists of 3 in my loop. I want to generate lists of 4 but when I run it I still get lists of three in my code.

import random
from unittest import result
a = "0xa5E0829"
b = "0x1b02d06"
c = "0xE5924564"
d = "0xE592427A0AEc"
e = "0xC60aEDD088"
f = "0xf61fdaFd997"
g = "0xd796F"
h = "0xDE7"
i = "0xA107B80b6c57429"
j = "0x93bcDF25"
ko = "0x07eF0"



for x in range(0,200):
    xh = (list(set(random.sample([a,b,c,d,e,g,h,i,j,ko],4)))) 
    new_lists = [xs for xs in xh if len(xs)>4]
    results = str(new_lists)
    print (results+",") 
0 Answers
Related