# A set containing every value in range(5):
five_set = {x for x in range(5)}
print (five_set)
# Out: {0, 1, 2, 3, 4}
# A set of even numbers between 1 and 10:
even_set = {x for x in range(1, 11) if x % 2 == 0}
print (even_set)
# Out: {2, 4, 6, 8, 10}
# Unique alphabetic characters in a string of text:
text = "When in the Course of human events it becomes necessary for one people..."
new_set = {ch.lower() for ch in text if ch.isalpha()}
print (new_set)
# Out: {'i', 'e', 'b', 'c', 'r', 'p', 's', 'f', 'h', 'a', 'm', 'v', 'n', 't', 'u', 'w', 'o', 'y', 'l'}
IyBBIHNldCBjb250YWluaW5nIGV2ZXJ5IHZhbHVlIGluIHJhbmdlKDUpOgpmaXZlX3NldCA9IHt4IGZvciB4IGluIHJhbmdlKDUpfQpwcmludCAoZml2ZV9zZXQpCiMgT3V0OiB7MCwgMSwgMiwgMywgNH0KCiMgQSBzZXQgb2YgZXZlbiBudW1iZXJzIGJldHdlZW4gMSBhbmQgMTA6CmV2ZW5fc2V0ID0ge3ggZm9yIHggaW4gcmFuZ2UoMSwgMTEpIGlmIHggJSAyID09IDB9CnByaW50IChldmVuX3NldCkKIyBPdXQ6IHsyLCA0LCA2LCA4LCAxMH0KCiMgVW5pcXVlIGFscGhhYmV0aWMgY2hhcmFjdGVycyBpbiBhIHN0cmluZyBvZiB0ZXh0Ogp0ZXh0ID0gIldoZW4gaW4gdGhlIENvdXJzZSBvZiBodW1hbiBldmVudHMgaXQgYmVjb21lcyBuZWNlc3NhcnkgZm9yIG9uZSBwZW9wbGUuLi4iCm5ld19zZXQgPSB7Y2gubG93ZXIoKSBmb3IgY2ggaW4gdGV4dCBpZiBjaC5pc2FscGhhKCl9CnByaW50IChuZXdfc2V0KQojIE91dDogeydpJywgJ2UnLCAnYicsICdjJywgJ3InLCAncCcsICdzJywgJ2YnLCAnaCcsICdhJywgJ20nLCAndicsICduJywgJ3QnLCAndScsICd3JywgJ28nLCAneScsICdsJ30=
{0, 1, 2, 3, 4}
{8, 2, 10, 4, 6}
{'f', 't', 'i', 'r', 'v', 'b', 'u', 'y', 'l', 'p', 's', 'w', 'h', 'e', 'c', 'm', 'a', 'n', 'o'}