Header Ads

Responsive Ads Here

Set Comprehension

 Set Comprehension



s = {i**3 for i in range(1,11)}
print(s)

l = [[1,2,3],[4,5,6],[7,8,9]]

s1 = {i for j in l for i in j}
print(s1)

Powered by Blogger.