import random
items1 = [35, 12, 99, 68]
items2 = [45, 8, 29]
items3 = items2 + items1
print(items3)
items4 = ['hello'] * 3
print(items4)
print(100 in items3)
print('hello' in items4)
size = len(items3)
print(size)
print(items3[0], items3[-1], items3[-size])
print(items3[size - 1], items3[-1])
print(items3[: 5])
print(items3[4:])
print(items3[-5:-7:-1])
print(items3[::-2])
items5 = [1, 2, 3, 4]
items6 = list(range(1, 5))
print(items5 == items6)
items7 = [3, 2, 1]
print(items5 <= items7)
items = ['Python', 'Java', 'Go', 'Kotlin']
for index in range(len(items)):
print(items[index])
for item in items:
print(item)
counters = [0] * 6
for _ in range(6000):
face = random.randint(1, 6)
counters[face - 1] += 1
for face in range(1, 7):
print(f'{face}点出现了{counters[face - 1]}次')
items.append('Swift')
print(items)
items.insert(2, 'SQL')
print(items)
items.remove('Java')
print(items)
items.pop(0)
print(items)
items.pop(len(items) - 1)
print(items)
items.clear()
print(items)
items = ['Python', 'Java', 'Java', 'Go', 'Kotlin', 'Python']
print(items.index('Python'))
print(items.index('Python', 2))
print(items.count('Python'))
print(items.count('Go'))
print(items.count('Swfit'))
items.sort()
print(items)
items.reverse()
print(items)
items1 = []
for x in range(1, 10):
items1.append(x)
print(items1)
items2 = []
for x in 'hello world':
if x not in ' aeiou':
items2.append(x)
print(items2)
items3 = []
for x in 'ABC':
for y in '12':
items3.append(x + y)
print(items3)
items1 = [x for x in range(1, 10)]
print(items1)
items2 = [x for x in 'hello world' if x not in ' aeiou']
print(items2)
items3 = [x + y for x in 'ABC' for y in '12']
print(items3)
scores = [[0] * 3 for _ in range (5)]
print(scores)
scores[0][0] = 100
print(scores)