LoginSignup
2
1

More than 3 years have passed since last update.

Pythonで文字列を逆順にする

Posted at

サンプルコード

string.py
#反転させる文字列
input_line = input()
#ここで反転
ans = input_line[::-1]
#answer
print(ans)

感想

あまり使わなそうなコードですが、覚えておいて損はないです。

2
1
0

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
2
1