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

云学编程的第4天—【微软官方python入门教程 P9-P10笔记】2021-11-04 字符串

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

云学编程的第4天—【微软官方python入门教程 P9-P10笔记】2021-11-04 字符串

P9字符串

Strings can be stored in variables

first_name='Christopher'
print(first_name)

variable windup acting as placeholders inside of your code for some values.

To declare a variable, just give it name, set it to some value.

You can combine strings with+

first_name='Christopher'
last_name='Harrison'
print(first_name+last_name)
print('Hello ' + first_name + ' ' + last_name)

variable name➡️  a word an underscore and then a word

if they are going to need multiple words to make it clear, convention in py is always lowercase.

you can use functions to modify strings

 The functions help us format strings we save to files and databases, or disply to user.

 P10实操

·a lntellisense beta functionality for you, see already highlightd all that you need to do is hit tab.

·可以把+换成半角, 用,会加上空格;用+就没有空格

·other things that you could potentially do with strings , you can take a look at the docs inside of  py.——可以归纳Python中字符串常用处理函数

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

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

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