Could somebody please point out where my ValueError syntax is wrong? Thank you!
def GeneratingList(n,k):
try:
l = []
while (n <=k):
for i in range(n):
v.append(QQ(randint(1,k)))
if (len(set(l)) == len(l)):
return l
else:
l = []
assert false
except ValueError:
print("value error, enter valid input n >= k")