Set Set is also one of the Data structure in python, the set is ever simple to understand, it also contains curly bracket ‘{}’ , but the only thing it will not accept duplicate value which is the same values. Let’s understand by code, Input: D = {20, 42, 111, 20, 434, ”uk”} type(D) Output: set Input: D Output: {111, 20, 42, 434, ”uk”}‘ Input: D[3] Output: --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-48-846febc3581b> in <module> ----> 1 D [ 3 ] TypeError : 'set' object is not subscriptable ...
In this blog, you can read and learn more about Python programming, Artificial intelligence and Machine Learning. “Ultimately, it comes down to taste. It comes down to trying to expose yourself to the best things that humans have done and then try to bring those things into what you’re doing.” - Steve Jobs