parse n dimensional list python

Solutions on MaxInterview for parse n dimensional list python by the best coders in the world

showing results for - "parse n dimensional list python"
Salvatore
01 Nov 2020
1# Python program to demonstrate that we 
2# can access multidimensional list using 
3# square brackets 
4a = [ [2, 4, 6, 8 ],  
5    [ 1, 3, 5, 7 ],  
6    [ 8, 6, 4, 2 ],  
7    [ 7, 5, 3, 1 ] ]  
8          
9for i in range(len(a)) :  
10    for j in range(len(a[i])) :  
11        print(a[i][j], end=" ") 
12    print()     
13