Retourner au contenu associé (dépêche : Sortie de Ruby 1.8.2)
Posté par Pascal Terjan le 05 janvier 2005 à 13:57. En réponse à la dépêche Sortie de Ruby 1.8.2. Évalué à 1.
Python : string.split(s,'","') Ruby: s.split(',')
Python: string.join(string.split(s),"|") Ruby: s.split().join('|')
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
[^] # Re: Différence avec Python ?
Posté par Pascal Terjan . En réponse à la dépêche Sortie de Ruby 1.8.2. Évalué à 1.
Python : string.split(s,'","') Ruby: s.split(',')On voit mieux en Ruby qu'on appelle une methode de l'objet surtout quand on enchaine :Python: string.join(string.split(s),"|") Ruby: s.split().join('|')