ขนาดวิดีโอ: 1280 X 720853 X 480640 X 360
แสดงแผงควบคุมโปรแกรมเล่น
เล่นอัตโนมัติ
เล่นใหม่
Thumbnail has a typo: symmetric difference and intersection should be swapped
Also:print(2 in a)to check if given element is present in a set
Are a -= b and a.difference_update(b) the same in terms of memory and CPU time?
***I think***Both are turned to "CALL set.diffrence_update(a, b)" in byte code (not this, but just the same meaning)
a: set[str] = {"cool", "useful", "great" }
Oh my god! I saw your face now although I have listened to your lessons alot. Thanks for help
a |= bwill update a, sort of a = (a | b)but in shorter form
The “syntactic sugar” operators make sense if you think about it in terms of bitwise operators. & is in both; ^ is in one or the other but not both; | is in either; AND, XOR, OR.
Knowing this would have helped me in my Discrete Math class lol
Nice to see your face -- not important for the info, but nice just the same. :-). Also, thanks very much for the videos.
By the way, I'm looking forward your newt videos on "one liners" in python script.Kinda regards and respect.
importlib module (usecases)and __import__ function
In the thumbnail, ^ and & got interchanged
Thank you, I’ll fix it as soon as I get the chance!
wats a set?
Wdym no one told you about?
Thumbnail has a typo: symmetric difference and intersection should be swapped
Also:
print(2 in a)
to check if given element is present in a set
Are a -= b and a.difference_update(b) the same in terms of memory and CPU time?
***I think***
Both are turned to "CALL set.diffrence_update(a, b)" in byte code (not this, but just the same meaning)
a: set[str] = {"cool", "useful", "great" }
Oh my god! I saw your face now although I have listened to your lessons alot. Thanks for help
a |= b
will update a, sort of
a = (a | b)
but in shorter form
The “syntactic sugar” operators make sense if you think about it in terms of bitwise operators. & is in both; ^ is in one or the other but not both; | is in either; AND, XOR, OR.
Knowing this would have helped me in my Discrete Math class lol
Nice to see your face -- not important for the info, but nice just the same. :-). Also, thanks very much for the videos.
By the way, I'm looking forward your newt videos on "one liners" in python script.
Kinda regards and respect.
importlib module (usecases)
and __import__ function
In the thumbnail, ^ and & got interchanged
Thank you, I’ll fix it as soon as I get the chance!
wats a set?
Wdym no one told you about?