5 第一个模块

"""
  test1.py
  注意缩进!! """ def pt_line(char,times,num): row=0 while row<num: print(char * times) row+=1 name ="my first module:"
"""
  test2.py
"""

import test1 print(test1.name) test1.pt_line("*",10,4)

运行 test2.py

 

posted @ 2020-06-08 03:52  abel2020  阅读(104)  评论(0编辑  收藏  举报