diff --git a/diy3.py b/diy3.py index 83eacf4..bc0c648 100644 --- a/diy3.py +++ b/diy3.py @@ -1,3 +1,66 @@ message = "诺依,周末一起去看动漫展吧!" +length=len(message) +# 请使用索引的知识,取出message所有元素(不用遍历的方式) +i=0 +while i < length: + rljm=message[i] + print(i) + i+=1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -# 请使用索引的知识,取出message所有元素(不用遍历的方式) \ No newline at end of file