filmov
tv
Sets in Python (Overview) - Data Types in Python - Python Tutorial for Beginners

Показать описание
🎓 Welcome back to Digital Academy, the Complete Python Development Tutorial for Beginners, which will help you Learn Python from A to Z!
🖥️ Sets in Python - Data Types in Python
In Python, Set is an unordered collection of data type that is: iterable, mutable and has unique elements. The order of elements in a set is undefined, though it may consist of various elements. The advantage of using a set, as opposed to a list, is that it has a highly optimized method, for checking whether a specific element is contained in the set!
Set is defined by curly braces, with unique values, which are separated by commas. You can perform multiple set operations, like: union and intersection on two sets. Since sets are unordered collection, indexing has no meaning. Hence the slicing operator does not work.
my_set = {1, "Like", "Comment", "Share", True}
Let's play this video, stick around and watch until the end of this video! 👍🏻
- Digital Academy™ 🎓
***
☞ WATCH NEXT:
#Python #Tutorial #Beginners #Shorts
***
♡ Thanks for watching and supporting ♡
Please Subscribe. Hit the notification bell.
Like, Comment and Share.
***
♡ FOLLOW US ♡
♡ SUPPORT US ♡
***
🖥️ Sets in Python - Data Types in Python
In Python, Set is an unordered collection of data type that is: iterable, mutable and has unique elements. The order of elements in a set is undefined, though it may consist of various elements. The advantage of using a set, as opposed to a list, is that it has a highly optimized method, for checking whether a specific element is contained in the set!
Set is defined by curly braces, with unique values, which are separated by commas. You can perform multiple set operations, like: union and intersection on two sets. Since sets are unordered collection, indexing has no meaning. Hence the slicing operator does not work.
my_set = {1, "Like", "Comment", "Share", True}
Let's play this video, stick around and watch until the end of this video! 👍🏻
- Digital Academy™ 🎓
***
☞ WATCH NEXT:
#Python #Tutorial #Beginners #Shorts
***
♡ Thanks for watching and supporting ♡
Please Subscribe. Hit the notification bell.
Like, Comment and Share.
***
♡ FOLLOW US ♡
♡ SUPPORT US ♡
***