rotate 90 degrees clockwise counter python
new_matrix = [[m[j][i] for j in range(len(m))] for i in range(len(m[0])-1,-1,-1)]
rotate 90 degrees clockwise counter python
new_matrix = [[m[j][i] for j in range(len(m))] for i in range(len(m[0])-1,-1,-1)]
rotate matrix 90 degrees clockwise in python
#The program defines the square matrix 90 degrees clockwise direction.
m,n = map(int,input().split())
#m,n are the number of rows and columns.
#m = int(input('rows'))
l = []
for i in range(m):
x = list(map(int,input().split())) #for taking the rows a time and split it append to an empty list
l.append()
for i in range(m):
for j in range(m-1,-1,-1):
print(l[j][i],end=' ')
print(end='n')
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us