Skip to content

Commit d27d675

Browse files
committed
String
1 parent e7c6560 commit d27d675

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ from numbers import Number, Integral, Real, Rational, Complex
240240
String
241241
------
242242
```python
243-
<str> = <str>.strip() # Strips all whitespace characters from both ends.
244-
<str> = <str>.strip('<chars>') # Strips all passed characters from both ends.
243+
<str> = <str>.strip() # Strips all whitespace characters from both ends.
244+
<str> = <str>.strip('<chars>') # Strips all passed characters from both ends.
245245
```
246246

247247
```python
@@ -251,12 +251,15 @@ String
251251
```
252252

253253
```python
254-
<str> = <str>.replace(old_str, new_str)
255-
<bool> = <str>.startswith(<sub_str>) # Pass tuple of strings for multiple options.
256-
<bool> = <str>.endswith(<sub_str>) # Pass tuple of strings for multiple options.
257-
<int> = <str>.index(<sub_str>) # Returns start index of first match.
258-
<bool> = <str>.isnumeric() # True if str contains only numeric characters.
259-
<list> = textwrap.wrap(<str>, width) # Nicely breaks string into lines.
254+
<str> = <str>.replace(old, new [, count]) # Replaces 'old' with 'new' at most 'count' times.
255+
<bool> = <str>.startswith(<sub_str>) # Pass tuple of strings for multiple options.
256+
<bool> = <str>.endswith(<sub_str>) # Pass tuple of strings for multiple options.
257+
<int> = <str>.index(<sub_str>) # Returns start index of first match.
258+
```
259+
260+
```python
261+
<bool> = <str>.isnumeric() # True if str contains only numeric characters.
262+
<list> = textwrap.wrap(<str>, width) # Nicely breaks string into lines.
260263
```
261264

262265
### Char

0 commit comments

Comments
 (0)