What is the shortest way to get to two distinct lists, a
, and b
, which contain random integers.
I currently have:
(a,b)=([randint(0,30)for x in range(10)][randint(0,30)for x in range(10)])
or
a=[randint(0,30)for x in range(10)]
b=[randint(0,30)for x in range(10)]
Using
a=b=[randint(0,30)for x in range(10)]
produces two identical lists.
Is there a shorter way to do this?