UIFlow Guide
数组处理与数组函数使用
from m5stack import *
from m5ui import *
from uiflow import *
list01 = None
list02 = None
def first_index(my_list, elem):
try: index = my_list.index(elem) + 1
except: index = 0
return index
list01 = []
list02 = [1, 2, 3, [4, 5, 6]]
print(len(list02))
print(not len(list01))
print(list02[1])
print(first_index(list02, 1))
print(list02[2 : 4])
print(list(reversed(list02)))
list02[-1] = 9
print(list02)
list01 = [2] * 2
print(list01)
print('1,2,3,4'.split(','))
list01 = []
list02 = [1, 2, 3, [4, 5, 6]]
print(list02[1])
print(list02[2 : 4])
print(first_index(list02, 1))
print(not len(list01))
print(len(list02))
list01 = [2] * 2
print(list01)
print(list(reversed(list02)))
list02[-1] = 9
print(list02)
print('1,2,3,4'.split(','))