循環

for循環 例子1: 結果 range():stop: 計數到 stop 結束,但不包括 stop。例如:range(0, 5) 是[0, 1, 2, 3, 4]沒有5; format():更常見的用法其實是str.format(),其基本語法是通過{}來代替以前的%; 例子2: 返回結果 while循環: 例子:加入登陸限制
相關文章
相關標籤/搜索