Sets in Python: What is a Set and How to use Sets in Python?

https://www.youtube.com/watch?v=NaYeHqltROw

🎓 Welcome back to Digital Academy, the Complete Python Development Tutorial for Beginners, which will help you Learn Python from A to Z!

🖥️ What are Sets in Python? Definition, Use and Declaration (Overview)

Python offers a range of compound Data Types, often referred to as sequences. Set is one of the most frequently used Data Types in Python – amongst List, Dictionary and Tuple. In fact, Set in Python is a collection of items, which is: not indexed, unordered, contains only unique elements, and is of mutable type – so it can be changed, grow and shrink, once it has been created.

The important properties of Python sets are as follows:

○ Sets are unordered – Items stored in a set are not kept in any particular order ;
○ Set items are unique – Duplicate items are not allowed ;
○ Sets are unindexed – You cannot access set items by referring to an index ;
○ Sets are changeable (mutable) – They can be changed in place, grow and shrink.

Moreover, they are commonly used for computing mathematical operations such as: union, intersection, difference, and symmetric difference operations.



Great! Now that you have understood what is a Set in Python, let’s move forward and let’s discover How to create a Set in Python – but also what are all of the operations and the methods that you can perform on sets in Python, in order to: add, remove, or access an item, even search for a specific item inside of this Set.

Let’s play this video, stick around and watch until the end of this video! 👍🏻

– Digital Academy™ 🎓

***

☞ WATCH NEXT:
○ Data Types in Python – https://youtu.be/cweUByxBWiU
○ Operators in Python – https://youtu.be/-wDaVLkKOiU
○ IF Statements in Python – https://youtu.be/CC5seZ6OBJ4
○ FOR Loops in Python – https://youtu.be/JgH-D5DSTho

☞ WATCH MORE:
○ HOW TO Learn Python? Python Tutorial for Beginners [FULL Course] https://youtu.be/9hvnSZPMtuw

📖 Blog: http://digital.academy.free.fr/blog/

📖 Complete Python Development Course for Beginners [PLAYLIST]: http://digital.academy.free.fr/playlist/python-development-for-beginners

🛒 Shopping and Discounts: http://digital.academy.free.fr/store/

#Python #Tutorial #Beginners #Shorts

***

♡ Thanks for watching and supporting ♡
Please Subscribe. Hit the notification bell.
Like, Comment and Share.

***

♡ FOLLOW US ♡
http://digital.academy.free.fr/
https://twitter.com/DigitalAcademyy
https://www.facebook.com/digitalacademyfr
https://www.instagram.com/digital_academy_fr/
https://www.youtube.com/c/DigitalAcademyOnline

♡ SUPPORT US ♡
http://digital.academy.free.fr/join
http://digital.academy.free.fr/donate
http://digital.academy.free.fr/subscribe
https://www.patreon.com/digital_academy
https://www.buymeacoffee.com/digital_academy

***

Copy link
Powered by Social Snap