Ref #97: Replace built-in shadowed str

This commit is contained in:
Jared
2019-10-06 19:48:51 +00:00
parent e5d48daa30
commit 0f6556478c
11 changed files with 28 additions and 28 deletions

View File

@ -5,11 +5,11 @@ tags: string, beginner
Returns the length of a string in bytes.
Use `string.encode('utf-8')` to encode the given string and return its length.
Use `input_string.encode('utf-8')` to encode the given string and return its length.
```py
def byte_size(string):
return len(string.encode('utf-8'))
def byte_size(input_string):
return len(input_string.encode('utf-8'))
```
```py