circuitpython/tests/unicode/unicode_slice.py

13 lines
170 B
Python

# Test slicing of Unicode strings
s = "Привет"
print(s[:])
print(s[2:])
print(s[:5])
print(s[2:5])
print(s[2:5:1])
print(s[2:10])
print(s[-3:10])
print(s[-4:10])