function and matrix form

how do i create multiple list in fuction

You can create multiple lists inside the function using list comprehension or nested for loops.

for example :

list comphresion


matrix = [[int(input()) for j in range(n)] for i in range(m)]

Similarly, you can write with nested for loops as well.