Set Comprehensions
Set comprehensions are similar to list comprehensions, the only difference is the use of braces {} rather than brackets [] and sets can only contain unique values. They are of the form: my_set = { expression for expression in iterable } You can also add an if condition: my_set = { expression for expression in […]