all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
6
Task/String-length/Python/string-length-2.py
Normal file
6
Task/String-length/Python/string-length-2.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/env python
|
||||
# -*- coding: UTF-8 -*-
|
||||
s = "møøse"
|
||||
assert len(s) == 5
|
||||
assert len(s.encode('UTF-8')) == 7
|
||||
assert len(s.encode('UTF-16')) == 12 # The extra character is probably a leading Unicode byte-order mark (BOM).
|
||||
Loading…
Add table
Add a link
Reference in a new issue