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中字符串常用处理函数

被折叠的 条评论
为什么被折叠?



