mirror of
https://github.com/licsber/micropython.git
synced 2024-09-20 17:10:24 +08:00
91fb1c9b13
This reuses as much str implementation as possible, from this we can make them more separate as needed.
12 lines
119 B
Python
12 lines
119 B
Python
a = b"123"
|
|
print(a)
|
|
print(str(a))
|
|
print(repr(a))
|
|
print(a[0], a[2])
|
|
print(a[-1])
|
|
|
|
s = 0
|
|
for i in a:
|
|
s += i
|
|
print(s)
|