python学习记录4-循环语句
作者:互联网
循环语句--for&&while
for循环
Python for循环可以遍历任何序列的项目,如一个列表或者一个字符串。语法如下:
for iterating_var in sequence: statements(s)
>>>def digui(m): >>> count = 1 >>> for i in range(1, m+1): >>> count *= i >>> return count >>>print(digui(4)) 24
标签:语句,count,statements,sequence,python,digui,循环 来源: https://www.cnblogs.com/jim-study/p/14970798.html