您好,欢迎来到外链网!
当前位置:外链网 » 站长资讯 » 专业问答 » 文章详细 订阅RssFeed

python 保留回车符,python中提示符换行怎么用的

来源:互联网 浏览:98次 时间:2023-04-08

这个 ‘\’符号的作用是连接变量或者代码过长,仔细看下面代码,理解它的用法:

#!/usr/美丽的乌冬面/python# -*- coding: utf-8 -*-import MySQLdba = "https://blog.51cto.com"\ "dinghanhua/p/"\ "9900775.html"print ab= """第一行第二行第三行"""print bc = "thins line is toooooooooooo\lone"print "c: ",cd = "https://blog.51cto.com/\dinghanhua/p/\9900775.html"print "d: ",dprint "thins line is toooooooooooo\lone"

上面的输出结果

https://blog.51cto.com/dinghanhua/p/9900775.html第一行第二行第三行c: thins line is tooooooooooooloned: https://blog.51cto.com/dinghanhua/p/9900775.htmlthins line is toooooooooooolone

转载于:https://blog.51cto.com/weiruoyu/2358586