python实现换行的方法: 1、使用换行符“n”实现换行 #-*-coding:utf-8-*- A = "来看看能不能n换行。" print (A) 输出结果: 来看看能不能换行。 2、使用三个双引号或单引号将要换行的字符括起来 #-*-coding:utf-8-*- A = """来看看能不能 换行。""" B='''来看看能不能 换行。''' print (A) print (B) 输出结果: 来看看能不能换行。来看看能不能换行。 更多Python知识请关注Python自学网。