You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
19 lines
266 B
Python
19 lines
266 B
Python
# basic tuple functionality
|
|
x = (1, 2, 3 * 4)
|
|
print(x)
|
|
try:
|
|
x[0] = 4
|
|
except TypeError:
|
|
print("TypeError")
|
|
print(x)
|
|
try:
|
|
x.append(5)
|
|
except AttributeError:
|
|
print("AttributeError")
|
|
|
|
print(x[1:])
|
|
print(x[:-1])
|
|
print(x[2:3])
|
|
|
|
print(x + (10, 100, 10000))
|