Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python reverse 2d list

>>> a = [[6, 5, 4], [3, 2, 1]]				# 2d array
>>> print([i[::-1] for i in a[::-1]])		# reverse each element in the arrays and the arrays themselves		
# output: [(1, 2, 3), (4, 5, 6)]
Comment

PREVIOUS NEXT
Code Example
Python :: visitor IP address django 
Python :: sum of 2 numbers in python 
Python :: python add item multidimensional list 
Python :: python mean ndarray 
Python :: fast fourier transform python 
Python :: pythonwrite to file 
Python :: django boilerplate command 
Python :: list comprehension if 
Python :: lambda condition python 
Python :: dataframe standardise 
Python :: python parcourir un dictionnaire 
Python :: openpyxl fast tutorial 
Python :: pandas drop row from a list of value 
Python :: how to make an ai 
Python :: reverse the words in a string python 
Python :: root mean squared error python 
Python :: simple way of finding file extension python programming 
Python :: convert numpy array to cv2 image 
Python :: np one hot encoding 
Python :: check all values in dictionary python 
Python :: python get file name 
Python :: train_test_split sklearn 
Python :: debug mode: on flask pythin window 
Python :: beautiful soup 4 
Python :: get json from file python 
Python :: time.time() 
Python :: How to change values in a pandas DataFrame column based on a condition in Python 
Python :: pandas dataframe get number of occurrence in column 
Python :: pdf to csv python 
Python :: remove ,drop,effacer, dataframe,python 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =