Skip to content
fieldsfarmer edited this page Oct 11, 2016 · 8 revisions

Some notes

Comparison of Python and JavaScript

split

return a sorted string

sort

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'

Clone this wiki locally