You're going to get a chance to explore them, and you'll see not only are there the standard numerics for strings, there are things like length or plus or other things you can do with them.
以后你们还会学到更多,你会学到字符串,不仅仅能运用标准数值运算,你还可以对他们求长度,或者加上其他的东西。
The string module contains several types of things, such as functions, methods, and classes; it also contains strings of common constants. For example
string 模块包含了几种类型的事物,如函数、方法和类;它还包含了公共常量的字符串。
And so you'll find in the reading of pointer to plots, and it will tell you everything you need to know, all of the wizardry and the magic you can put in these strings that tell you how to do things.
所以你可以,在通过指向plot的指针的读数,它会告诉你你想知道的一切,在这些字符串中,你可以加上各种魔法,去告诉你怎样做事情。
And the nice thing is that there's a shared behavior there. Just as I can have tuples as an ordered collection of things, strings behave as an ordered collection of things.
共享的行为,就像元组是有序的元素序列,字符串也是有序的元素序列,因此我可以对字符串做同样的操作,我可以把它们连结起来。
So strings also support things like selection, slicing, and a set of other parameters, other properties. And let's just look at that.
如果我要到这里来的话,就得把这儿注释掉,这里是我已经建立的。
Things like addition and multiplication, which we saw not only apply to numbers, but we can use them on things like strings and we're going to come back to them again.
就像加法和乘法,我们已经学习过,它们不仅仅可以应用于数字,还可以用到字符串上,我们今天还会再讲讲。
应用推荐