1、打开cmd

2、进入python交互界面

3、定义多行字符串str = 'ab c \n de f \n gh i\n'

4、用splitlines()进行分割 lines = str.splitlines()

5、打印输出

1、1.打开cmd
2.进入python交互界面
3.定义多行字符串str = 'ab c \n de f \n gh i\n'
4.用splitlines()进行分割 lines = str.splitlines()
5.打印输出
时间:2026-02-12 14:14:07
1、打开cmd

2、进入python交互界面

3、定义多行字符串str = 'ab c \n de f \n gh i\n'

4、用splitlines()进行分割 lines = str.splitlines()

5、打印输出

1、1.打开cmd
2.进入python交互界面
3.定义多行字符串str = 'ab c \n de f \n gh i\n'
4.用splitlines()进行分割 lines = str.splitlines()
5.打印输出