Last active
April 21, 2019 20:09
-
-
Save eggplants/d0d663db9be321bc4b6ff85461944e1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#list(n-D) "data".flatten | |
sum(data,[]) | |
#uniq | |
import numpy as np | |
np.unique(ans, axis=0) | |
#<< | |
data.append(line.split()) | |
#chomp | |
str.strip() | |
#scan->list | |
import re | |
re.findall(regexp,str) | |
#match->match | |
import re | |
re.search(regexp,str) | |
#extract "list(n-D)[n-row]"s | |
nD_list=[[1,2,3],[4,5,6],[7,8,9],[10,11,12]] | |
extracted_row=[x[row_n] for x in nD_list] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment