Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def CreateW(A: list, B: list, column: list, headers: list) -> list:
- W = [0]*(len(A[0])+1)
- for i in range(len(A)):
- if column[i][0] == 'y':
- for j in range(len(A[0])):
- W[j] += A[i][j]
- W[len(A[0])] += B[i]
- for j in range( len( A[0] ) ):
- if headers[j][0] == 'y':
- W[j] += 1
- return W
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement