Python/String: Difference between revisions
< Python
Jump to navigation
Jump to search
| Line 13: | Line 13: | ||
! || Sample | ! || Sample | ||
|- | |- | ||
| | | bytes => str | ||
| <source lang="python"> | | <source lang="python"> | ||
b'abc'.decode('utf-8) | b'abc'.decode('utf-8) | ||
Revision as of 16:50, 21 March 2018
Using statements
Using methods
| Sample | |
|---|---|
| bytes => str | b'abc'.decode('utf-8)
|
| Prefix & Suffix | if s.startswith(): ...
if s.endswith(): ...
|