Home > other >  Small white for bosses to solve thinking, how did the python matrix diagonal picture
Small white for bosses to solve thinking, how did the python matrix diagonal picture

Time:10-19

Is like figure, to transpose matrix

CodePudding user response:

Coordinates, in turn, they ran across

CodePudding user response:

Li=[
[1, 2, 3],
(4 and 6),
,8,9 [7]
]


For the x in the range (len (li) :
For y in range (x + 1) :
Li li [x] [y], [y] [x]=li [y] [x], li [x] [y]

For I in (li) :
Print (I)

CodePudding user response:

reference 1st floor JMZL response:
turn coordinates and ran across to the
I also know, how to do

CodePudding user response:

refer to the second floor JMZL response:
li=[
[1, 2, 3],
(4 and 6),
,8,9 [7]
]


For the x in the range (len (li) :
For y in range (x + 1) :
Li li [x] [y], [y] [x]=li [y] [x], li [x] [y]

For I in (li) :
Print (I)
as can be, and why

CodePudding user response:

reference 4 floor weixin_45846245 response:
Quote: refer to the second floor JMZL response:
li=[
[1, 2, 3],
(4 and 6),
,8,9 [7]
]


For the x in the range (len (li) :
For y in range (x + 1) :
Li li [x] [y], [y] [x]=li [y] [x], li [x] [y]

For I in (li) :
Print (I)
as can be, and why

Coordinate in turn! X, y axis reverse!
  • Related