diff options
Diffstat (limited to 'Lib/string.py')
-rw-r--r-- | Lib/string.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/string.py b/Lib/string.py index 92158ee..e449c20 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -475,7 +475,7 @@ def zfill(x, width): n = len(s) if n >= width: return s sign = '' - if s[0] in ('-', '+'): + if s[:1] in ('-', '+'): sign, s = s[0], s[1:] return sign + '0'*(width-n) + s |