栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

NOTE1:关于print() 10/01/2021-初学者

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

NOTE1:关于print() 10/01/2021-初学者

1.print()用于输出

2.print(“  ”)会如实输出双引号内的内容

print(“HEllow python”)

输出:HRllow python

3.print()没有双引号,用于输出变量

eg1.     a = hellow python

            print(a)      输出:hellow python

注意: print(“a”)    输出:a (而不是 hellow python,参考第 2 点).

4.print(f “   ”):括号内多了个f,为了能在括号内可以加 大括号 {}

eg2.    b = python

           print(f “i love {b} ”)       输出: i love python

注意:在引号内还想输出变量的方法是 给变量加上大括号 {}

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/283480.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号