1. 打印单一字符重复的分割线:
```python
def print_separator(char='-', length=30):
print(char * length)
print_separator()
2. 打印带有标题的分割线:```pythondef print_section(title, char='-', length=30):
print(f"{title}")
print(char * length)
print_section("Section Title")
3. 打印多种样式的分割线:
使用不同字符打印分割线:

```python
def print_custom_separator(char, length=30):
print(char * length)
print_custom_separator('*')
打印由任意字符组成的分割线:```pythondef print_line(char):
print(char * 50)
print_line('-')
打印任意重复次数的分割线:
```python
def print_line(char, times):
print(char * times)
print_line('-', 20)
以上代码示例展示了如何根据不同的需求打印分割线。你可以根据需要调整`char`和`times`参数来创建不同风格和长度的分割线
