kuroko/test/testUnicodeStrings.krk

25 lines
465 B
Python
Raw Normal View History

let hello = "おはようございます"
print(hello)
print(len(hello))
print(hello[0])
print(hello[1])
print(hello[-1])
print(hello.encode())
print(len(hello.encode()))
print(hello.encode().decode())
let bytes = b'\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a'
print(bytes)
print(bytes.decode())
print(len(bytes.decode()))
print(len(bytes))
print("テスト、テスト、日本語、おはよう".split(""))
for c in hello:
print(c)