fruit = ["apple", "orange", "banana", "cherry"] numlist = [6, 7] newlist = fruit + numlist print(newlist) # ['apple', 'orange', 'banana', 'cherry', 6, 7] print([1, 2] + [3, 4]) # [1, 2, 3, 4] print(['a', 'b'] + [1, True]) # ['a', 'b', 1, True] print(numlist * 2) # [6, 7, 6, 7]
标签:apple,cherry,列表,orange,fruit,加法,print,numlist,乘法 From: https://www.cnblogs.com/sangern/p/17441875.html