LoginSignup
0
1

More than 3 years have passed since last update.

文字列まとめ1

Posted at

文字列

・pythonには、文字列を扱うデータの型としてstr型がある

文字列の演算

a="note"
b="book"
a+b
実行結果
"notebook"

for文を用いて1文字ずつ要素を出力

for a in "book":
    print(i)
実行結果
b
o
o
k
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