Is my answer better or worse? Lists and For Loops Practice Problems

Screen Link:
Lists And For Loops Practice Problems | Dataquest

My Code:

# My answer

total = 0
row_sum = 0
for el in matrix:
    row_sum = sum(el)
    total += row_sum

# DQ's Answer
num_rows = len(matrix)
num_cols = len(matrix[0])

total = 0
for row in range(num_rows):
    for col in range(num_cols):
        total += matrix[row][col]

Wanted to get feedback on whether my code is a better or worse answer to this practice problem. Would appreciate if anyone could point out why mine might be less preferable to the one provided by DQ. The goal here was to sum all the numbers in a nxm matrix. Thanks!

@arvinabedi since your answer passed the checks, yours seems to be a more concise version, although we usually prefer a nested for loop (one to iterate the rows in the dataset and one to iterate each value in the row for clarity when reading code (you may obviously comment your code to make it more readable).

Hope this helps!