From 348cf966ec0a07f3abd08a16b794f8f8484ca804 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Fri, 19 Aug 2022 09:41:12 +0800 Subject: [PATCH] auto save --- diy3.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/diy3.py b/diy3.py index d96cd14..41a974a 100644 --- a/diy3.py +++ b/diy3.py @@ -1,5 +1,7 @@ message = "诺依,周末一起去看动漫展吧!" # 请使用索引的知识,取出message所有元素(不用遍历的方式) - -print(message[0]) \ No newline at end of file +i = 0 +while i < len(message): + print(message[i]) + i += 1 \ No newline at end of file -- libgit2 0.25.0