函数的嵌套使用
def print_line():
print("*" * 50)
print_line
def print_line(char
):
print(char
* 50)
print_line
("-")
def print_line(char
, times
):
print(char
* times
)
print_line
("-",40)
def print_line(char
, times
):
print(char
* times
)
def print_lines(char
, times
):
row
= 0
while row
< 5 :
print_line
(char
,times
)
row
+= 1
print_lines
("-",20)
转载请注明原文地址: https://mac.8miu.com/read-499998.html