A = [[11, 12, 13, 14]]
B = [[11, 12, 13, 14, 15, 16],
[2, 1.1, 1.1, 1.3, 1.4, 1.5],
[2, 1.1, 1.1, 1.3, 1.4, 1.5],
[2, 1.1, 1.1, 1.3, 1.4, 1.5],
[2, 1.1, 1.1, 1.3, 1.4, 1.5]]
# Get difference between two lists.
diffs = set(A[0]).symmetric_difference(set(B[0]))
# Get the members index with list comprehension.
indexes = [B[0].index(diff) for diff in diffs]
# Copy B into C. Use copy() otherwise only the reference will be copied.
C = B.copy()
# Delete the columns of C
# This is slow but more readable since you are a beginner in python.
for row in C:
for index in indexes:
del row[index]
print(row)
Какие выходы:
[11, 12, 13, 14]
[2, 1.1, 1.1, 1.3]
[2, 1.1, 1.1, 1.3]
[2, 1.1, 1.1, 1.3]
[2, 1.1, 1.1, 1.3]
Этот код далек от оптимизации, он просто показывает несколько шагов для достижения результата.