-
Notifications
You must be signed in to change notification settings - Fork 0
Home
fieldsfarmer edited this page Oct 11, 2016
·
8 revisions
sort array a = [[3,4],[1,5]] | a.sort(key=lambda x: x[0]) | a.sort(function(i,j){return i[0]-j[0]})
| ~ | Python | Java |
|---|---|---|
| string replace | a='123,abc'; b=re.sub(r'[^a-zA-Z]','',a) #'abc' |
String b= a.replaceAll('[^a-zA-Z]',''); //'abc' |