Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #46 from sidagrawal/patch-1
Browse files Browse the repository at this point in the history
Update byte_size.md
  • Loading branch information
Chalarangelo committed Mar 30, 2019
2 parents e569f6d + b038f67 commit 07a5c5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snippets/byte_size.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Returns the length of a string in bytes.

`utf-8` encodes a given string and find its length.
`utf-8` encodes a given string, then `len` finds the length of the encoded string.

```python
def byte_size(string):
Expand All @@ -12,4 +12,4 @@ def byte_size(string):
```python
byte_size('😀') # 4
byte_size('Hello World') # 11
```
```

0 comments on commit 07a5c5f

Please sign in to comment.