程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python split line

編輯:Python
""" author:claire data:2022 year 06 month 24 Define a print_line Function to print * A dividing line Define a function that can print separators consisting of any character Define a function that can print split lines with any number of repetitions Print multiple split lines pycharm Add a divider to the function """
def print_line(char,times):
""" Print split lines """
print(char * times)
def print_lines(row,char,times):
""" Print multiline split lines :param row: Print a few lines :param char: Split characters used :param times: The number of times the split character is repeated """
for i in range (0,row,1):
print_line(char,times)
print_lines(5,"hi ",3)


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved