3
3

More than 5 years have passed since last update.

FLASK  ループでリストを出力【Windows.ver】

Last updated at Posted at 2019-06-22

目標:ブラウザで下記を表示する
2019-06-22 (6).png

1.リストを作成する

sanrios=["キティちゃん", "シナモン", "マイメロ"]

2019-06-22 (4).png

return ところにsanrios=sanriosを追記
retuen render_template("index.html, name_value=name, sanrios=sanrios)

2.ループで出力する
{% for sanrio in sanrios: %}

{{ sanrio + "はピューロランドにでかけた" }}


2019-06-22 (3).png

{% endfor %}を忘れずに。

3
3
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
3
3