2012-04-27 Rubyの配列におけるfirstとlastはPythonでいうと…? Rubyで array.firstとかarray.lastとか書きますが、pythonでは array[0]とarray[-1]です。