@@ -218,7 +218,7 @@ String
218
218
< bool > = < str > .endswith(< sub_str> ) # Pass tuple of strings for multiple options.
219
219
< int > = < str > .index(< sub_str> ) # Returns first index of a substring.
220
220
< bool > = < str > .isnumeric() # True if string contains only numeric characters.
221
- < list > = textwrap.wrap(< str > , width) # Nicely breakes string into lines.
221
+ < list > = textwrap.wrap(< str > , width) # Nicely breaks string into lines.
222
222
```
223
223
224
224
### Char
@@ -251,7 +251,7 @@ import re
251
251
< list > = re.split(< regex> , text, maxsplit = 0 ) # Use brackets in regex to keep the matches.
252
252
< Match> = re.search(< regex> , text) # Searches for first occurrence of pattern.
253
253
< Match> = re.match(< regex> , text) # Searches only at the beginning of the string.
254
- < Match_iter> = re.finditer(< regex> , text) # Searches for all occurences of pattern.
254
+ < Match_iter> = re.finditer(< regex> , text) # Searches for all occurrences of pattern.
255
255
```
256
256
257
257
* ** Parameter 'flags=re.IGNORECASE' can be used with all functions. Parameter 'flags=re.DOTALL' makes dot also accept newline.**
@@ -485,7 +485,7 @@ from enum import Enum
485
485
Direction = Enum(' Direction' , ' n e s w' )
486
486
Cutlery = Enum(' Cutlery' , {' knife' : 1 , ' fork' : 2 , ' spoon' : 3 })
487
487
488
- # Warrning : Objects will share the objects that are initialized in the dict !
488
+ # Warning : Objects will share the objects that are initialized in the dictionary !
489
489
Creature = type (' Creature' , (), {' position' : Point(0 , 0 ), ' direction' : Direction.n})
490
490
creature = Creature()
491
491
```
0 commit comments