VOOZH about

URL: https://qiita.com/Yuki-Takao/items/a1cd8331c341de48b6af

⇱ Pythonで言語処理100本ノック2015 問題00 #Python3 - Qiita


👁 Image
1

Go to list of users who liked

2

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

More than 5 years have passed since last update.

@Yuki-Takao(Yuki T)in👁 Image
株式会社スマイループス

Pythonで言語処理100本ノック2015 問題00

1
Last updated at Posted at 2017-08-26

普段はPHPerですが将来的にPythonで仕事したいです。
ということで、まず評判分析が面白そうという好奇心から言語処理100本ノックを始めました。
Python始めて3ヶ月・・・言語処理も機械学習も全くの素人です!
コメントでご指摘など頂けましたらありがたいです。

環境

・macbookAir (Sierra)10.12.3
・python 3.6
・anaconda 4.3.0
・jupyter notebook

00.問題:文字列"stressed"の文字を逆に(末尾から先頭に向かって)並べた文字列を得よ.

Python3
s = 'stressed'
print(s[::-1])
実行結果
desserts

slice()を使って
・逆順から
・全部取得
だけで逆順になりました。

参考

・slice()に関して: https://qiita.com/ycctw1443/items/03f99f3f72a797fdcbf6

1

Go to list of users who liked

2
0

Go to list of comments

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1

Go to list of users who liked

2