Skip to content

Commit 775ba55

Browse files
author
Randall Nagy
committed
BLT_01100.
1 parent bb448b5 commit 775ba55

7 files changed

+46
-1
lines changed

CardGame/QuestCore/2022_12_17_DrawnText.data

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ What is the purpose of a 'yield' statement?
274274
(5) None of the above
275275
*****
276276
KA1031: Set -v- Dictionary
277-
What is the difference between a dict and a set?
277+
What is the difference between a `dict` and a `set`?
278278

279279
(1) A dict is mutable. A set is not
280280
(2) A set is slower than a dict
@@ -607,6 +607,24 @@ Show every odd between 1 and 10
607607
(4) range(1,10,3)
608608
(5) Two of the above
609609
*****
610+
KA1068: Set Basics
611+
>>> set('cat') - set('rat')
612+
613+
(1) {'a', 't'}
614+
(2) {'t'}
615+
(3) {'c'}
616+
(4) {'c','t'}
617+
(5) Two of the above
618+
*****
619+
KA1069: Set Basics
620+
>>> set('rat') - set('cat')
621+
622+
(1) {'a', 't'}
623+
(2) {'r'}
624+
(3) {'c'}
625+
(4) {'c','t'}
626+
(5) Two of the above
627+
*****
610628
KA2001: Exceptions
611629
What is an 'Exception'?
612630

@@ -1323,4 +1341,31 @@ The staticmethod decorator can be used on non-class functions
13231341
*****
13241342
KA3053: Decorators
13251343
How would you create a decorator?
1344+
*****
1345+
KA3054: Advanced Set
1346+
>>> set('cat') ^ set('rat')
1347+
1348+
(1) {'c'}
1349+
(2) {'t'}
1350+
(3) {'c', 't'}
1351+
(4) {'a'}
1352+
(5) {'a', 't'}
1353+
*****
1354+
KA3055: Advanced Dunders
1355+
How to intercept the `&` Operator?
1356+
1357+
(1) _&_
1358+
(2) __&__
1359+
(3) __amp__
1360+
(4) _amp_
1361+
(5) __and__
1362+
*****
1363+
KA3056: Set Removal
1364+
What is the difference between .remove & .discard?
1365+
1366+
(1) .discard is safer
1367+
(2) .remove may raise an Exception
1368+
(3) .remove is also part of list()
1369+
(4) .discard is not `Exceptionl` ;-)
1370+
(5) All of the above
13261371

62 Bytes
Loading
590 KB
Loading
590 KB
Loading
591 KB
Loading
591 KB
Loading
596 KB
Loading

0 commit comments

Comments
 (0)