0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Pythonで文字列を入力し、そのまま出力、または逆向きに出力する方法。

Posted at

Pythonでの文字列入力、出力、文字列を逆向きにして出力する方法を書いています。
よろしくおねがいします。

まず、Pythonで文字列を入力する方法。

s = input()

そのまま、出力したい場合。

print(s)

文字列を逆向きにして、出力したい場合。

print(s[::-1])

以上です。
ありがとうございました。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?