File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ Additional links:
51514.0
5252>> > 4 / 2
53532.0
54- >> > 4 // 2 # `//` is the integer division
54+ >> > 5 // 2 # `//` is the integer division
55552
5656>> > 3 % 2
57571
362362>> > s.remove(1 )
363363>> > s
364364{2 , ' a' }
365- >> > s.remove(1 ) # KeyError: 1
365+ >> > s.remove(1 ) # `KeyError: 1`
366+ >> > s.pop() # Remove and return an arbitrary element from the set
367+ 2
366368
367369>> > s0 = {1 , 2 , ' a' }
368370>> > s0
@@ -423,7 +425,7 @@ False
423425>> > d
424426{' a' : ' hello, world!' , ' b' : 11 , 1 : ' a new element' }
425427
426- >> > d[0 ] += 10 # KeyError: 0
428+ >> > d[0 ] += 10 # ` KeyError: 0`
427429>> > d.get(0 , 1 ) # Return `1` as default value since key `0` does not exist
4284301
429431>> > d.get(1 , ' ?' ) # Key `1` exists, so the actual value will be returned
You can’t perform that action at this time.
0 commit comments