len print count print sum print min max print if not print List is emp

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#1
z = [1, 3, 5, 6]
a = len(z)
print (a)
#2
q = [1, 2, 1, 2, 1, 3]
b = (q).count(2)
print (b)
#3
c = [1, 3, 5, 6, 8]
d = sum(c)
print (d)
#4
e = [1, 3, 5, 6, 8]
f = min (e)
g = max (e)
print (f,g)
#5
h = [1, 3, 5, 6, 8]
if not h:
print("List is empty")
else:
i = sum(h)/float(len(h))
print (i)
#6
j = [1, 3, 5, 6, 8]
for elem in j:
print (elem, end = ' ')
#8
k = [2, 4, 12, 7, 8]
l = [7, 0, 14, 210]
general_result = True
for elem in k:
if elem % 2 == 0:
print(elem, 'True')
else:
print (elem, 'False')
general_result = False
print(general_result)
for elem in l:
if elem % 7 == 0:
print ('True')
else:
print ('False')
#9
n = [1, 3, 5, 6, 8]
m = [1, 3, -5, 6, 8]
for elem in n:
if elem >= 0:
print ("True")
else:
print('False')
for elem in m:
if elem >= 0:
print ("True")
else:
print('False')
#10
p = [1, 3, 5, 6, 8] # знаю, что неправильно, но все же
r = [i for i in p if i%2 == 0]
print (r)
#11
s = 'quick brown fox jumps over the lazy dog'
t = s.split ()
print (t)
#12
u = [1, 3, 5, 6, 8, 7, 12, 1111, 19][5:]
print (u)
#13
v = [1, 3, 5, 6, 8, 7, 12, 1111, 19][1:][:-1]
print (v)