Sets in Python || Python Tutorial || Learn Python Programming

///Sets in Python || Python Tutorial || Learn Python Programming

Sets in Python || Python Tutorial || Learn Python Programming

Sets are a key way to store data in Python. In this tutorial, we show you how to create sets, how to add and remove elements from a set, and how to take the union and intersection of two sets. We will talk about lists, dictionaries and tuples in separate videos.

➢➢➢➢➢➢➢➢➢➢
To learn Python, you can watch our playlist from the beginning:

➢➢➢➢➢➢➢➢➢➢
We recommend:
Python Cookbook, Third edition from O’Reilly

The Mythical Man Month – Essays on Software Engineering & Project Management

Shop Amazon Used Textbooks – Save up to 90%

➢➢➢➢➢➢➢➢➢➢
Subscribe to Socratica:

To support more videos from Socratica, visit
Socratica Patreon

Socratica Paypal

We also accept Bitcoin! 🙂

➢➢➢➢➢➢➢➢➢➢
Python instructor: Ulka Simone Mohanty
Written & Produced by Michael Harrison
FX by Andriy Kostyuk

source

By |2020-10-11T10:01:35+00:00October 11th, 2020|Python Video Tutorials|27 Comments

1. Socratica October 11, 2020 at 10:01 am - Reply

Welcome to Socratica! You can see our entire Python Playlist here: http://bit.ly/PythonSocratica

Subscribe to see all our new videos! http://bit.ly/SocraticaSubscribe

2. żu REKT October 11, 2020 at 10:01 am - Reply

new system shock looks neat

Sets can be combined using mathematical operations.

The union operator | combines two sets to form a new one containing items in either.

The intersection operator & gets items only in both.

The difference operator – gets items in the first set but not in the second.

The symmetric difference operator ^ gets items in either set, but not both.

first = {1, 2, 3, 4, 5, 6}

second = {4, 5, 6, 7, 8, 9}

print(first | second)
1, 2, 3, 4, 5, 6, 7, 8, 9
print(first & second)
4, 5, 6
print(first – second)
1, 2, 3
print(second – first)
7, 8, 9
print(first ^ second)1, 2, 3, 7, 8, 9

4. Hector Vazquez October 11, 2020 at 10:01 am - Reply

Who else looked up "Thorium"? lol

5. anroid user October 11, 2020 at 10:01 am - Reply

Her eye-brows always convinces me to believe her.

6. The NeoDeviant October 11, 2020 at 10:01 am - Reply

kya chutiyaap hai seedhe bolna nhi aata

7. Pascal Schweitzer October 11, 2020 at 10:01 am - Reply

I am using Python quite a while in data science, but was never tought about the existence of sets. Are sets iterables? I have to try calling iter() on a set.
Nice video though. Keep on your great stuff.

8. acidvac October 11, 2020 at 10:01 am - Reply

Feel like there was Tiberium Sun background noise

9. Olivier October 11, 2020 at 10:01 am - Reply

calling 3.14159 the number Pi as a float and not an approximation of Pi as a float, triggered me, because this channel has this dry humour of being unnecessarily exact.

10. Molly Percocets October 11, 2020 at 10:01 am - Reply

For those who started learning Python 3 years ago, did Python helped you achieve your goals?

11. Jamba Mateus Jones October 11, 2020 at 10:01 am - Reply

12. Abdirahman Cigalle October 11, 2020 at 10:01 am - Reply

Someone comes on YouTube, just to watch crap, while there is some content like this…

13. carlos antonio dias mamen October 11, 2020 at 10:01 am - Reply

Excellent as always.

14. ninjaturtle205 October 11, 2020 at 10:01 am - Reply

DO NOT PANIC

15. Sandeep Kumar Ladi October 11, 2020 at 10:01 am - Reply

Thank you very much for your valuable videos. I am working as Assistant Professor in GITAM University Visakhapatnam. I want to know how can one implement RoughSets using python sets.

16. Rene cghg October 11, 2020 at 10:01 am - Reply

This is by far the best python tutorial out there. Wonderful structured and so well explained. All needed information are summarised in short videos and the abstract style of the videos let us learn this content quicker than in other videos keep books. Thanks for this masterpiece tutorial!!!

17. Do not cum for me October 11, 2020 at 10:01 am - Reply

DO NOT PANIC! 😌

18. Sachin Singh October 11, 2020 at 10:01 am - Reply

Which software you use for animation

19. Reha Taş October 11, 2020 at 10:01 am - Reply

She reminds me Ally in The 100

20. odd number October 11, 2020 at 10:01 am - Reply

Good explanation folk..i prefer the odd numbers

subscriber.append(me)

22. Walter Vas October 11, 2020 at 10:01 am - Reply

Why the silly poses? Otherwise it's great!

23. Vineet sharma October 11, 2020 at 10:01 am - Reply

Hello maam can i ask one question

24. Extra M October 11, 2020 at 10:01 am - Reply

I'm glad that I'm now inside the set of instructions.

25. H H October 11, 2020 at 10:01 am - Reply

stern warning!

26. Ibrahima Barry October 11, 2020 at 10:01 am - Reply

They should do a discrete math video series

27. First Impression October 11, 2020 at 10:01 am - Reply