Update input_string to s for string examples

This commit is contained in:
Jared
2019-10-08 02:43:58 +00:00
parent 0f6556478c
commit e1c05cd1c1
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 `input_string.encode('utf-8')` to encode the given string and return its length.
Use `s.encode('utf-8')` to encode the given string and return its length.
```py
def byte_size(input_string):
return len(input_string.encode('utf-8'))
def byte_size(s):
return len(s.encode('utf-8'))
```
```py