dict_ = {
0: 'Самый',
1: 'обычный',
2: 'текст'}
m = [
[1, 0, 0],
[0, 1, 0],
[0, 0, 1],
[0, 0, 1],
[0, 1, 0],
[1, 0, 0],
]
words = []
for line in m:
for number, column in enumerate(line):
if column:
words.append(dict_[number])
break
print(' '.join(words))
for i in range(0, len(dictwords)):
for j in range(0, len(dictwords[i])):
if i == j:
dictwords[i][j] = 1
y = y + keywords[i] * a[i][j]
else:
dictwords[i][j] = 0
y = y + keywords[i] * a[i][j]
x = [0,1,2,3,4,5,6,7,8,9]
y = 0
a = ((1,0,0,0,0,0,0,0,0,0), (0,1,0,0,0,0,0,0,0,0), (0,0,1,0,0,0,0,0,0,0),
(0,0,0,1,0,0,0,0,0,0), (0,0,0,0,1,0,0,0,0,0), (0,0,0,0,0,1,0,0,0,0),
(0,0,0,0,0,0,1,0,0,0), (0,0,0,0,0,0,0,1,0,0),(0,0,0,0,0,0,0,0,1,0), (0,0,0,0,0,0,0,0,0,1))
for i in range(0, len(a)):
for j in range(0,len(a[i])):
y = y + x[i] * a[i][j]
print(y)