15,613,716 members
See more:
Python
```marks = [['john',80, 90, 76, 82],['katy', 50, 55, 70, 65],['sydney',80,
72, 88, 90]]
marks_c = {}
for i in range(len(marks)):
name = marks[i][0]
l = []
for j in range(2,len(marks[i])):
print(marks[j][i])
print(marks_c)
print(marks_c)```

What I have tried:

Python
```marks = [['john',80, 90, 76, 82],['katy', 50, 55, 70, 65],['sydney',80,
72, 88, 90]]
marks_c = {}
for i in range(len(marks)):
name = marks[i][0]
l = []
for j in range(2,len(marks[i])):
print ( marks [j][i])```
Posted
Updated 20-Sep-21 21:35pm
v2
OriginalGriff 21-Sep-21 1:56am
What error?
What does it do that you didn't expect, or not do that you did?
What have you tried to do to find out why?
Are there any error messages, and if so, where and when? What did you do to make them happen?

This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Use the "Improve question" widget to edit your question and provide better information.

## Solution 1

Try
Python
```marks = [['john',80, 90, 76, 82],['katy', 50, 55, 70, 65],['sydney',80,
72, 88, 90]]
marks_c = {}
for i in range(len(marks)):
name = marks[i][0]
l = []
for j in range(2,len(marks[i])):
print(marks[i][j])
print(marks_c)
print(marks_c)```

## Solution 3

This works, although it is not clear what result you want:
Python
```marks = [['john',80, 90, 76, 82],['katy', 50, 55, 70, 65],['sydney',80, 72, 88, 90]]
for i in range(len(marks)):
print('Marks for', marks[i][0], ':', end='')
for j in range(1,len(marks[i])):
print(marks[i][j], ', ', sep='', end='')
print('')```