0
0

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.

paiza練習問題(文字列の表示)

Posted at

目次

  • 解いた問題
  • 参考にしたサイト
  • 振返り
  • 参考コード

本文

  • 解いた問題

  • 参考にしたサイト

なし

  • 振返り
    文字列の○番目から○番目を表示する問題。
    1文字目を0番目と数えることに注意。

  • 参考コード(文字列の3番目から6番目を表示)

a = "tokugawa ieyasu"
print(a[2:6])
# kuga
#print(a[3:6])ではないことに注意
#t o k u g a w a _ i e  y  a  s  u
#0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
0
0
1

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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?