byte
类型以字节存储数据
list
列表长度可变,可以进行修改、切片、追加、删除、嵌套、迭代、成员判断等操作
- code ```python s = “this is a book” s = s.replace(‘book’, ‘apple’) print(s.startwith(‘this’)) print(s.endwith(‘apple’))
if s[-1] == ‘@’: s = s[:-1]
3. code
```python
li = [2, 5, 6, 4, 9, 10, 23]
print(li[::-1])
print(sorted(li, reverse=True)[::2])