And in general, what I would say is, when in doubt, use parens. OK.
因此通常上,我会告诉大家的是,当有疑问的时候,请用括号,好。
We can start having complex expressions, you can imagine we can have things are lots of parens, and all sorts of things in it. Yes, question.
我们可以开始写复杂点的表达式了,你可以想象,我们有一个很多括号的表达式,里面有各种各样的东西,什么问题。
Yep. Are you telling me I want parens there and not, and not braces?
现在你告诉我我在这里要不要打括弧啊,需不需要大括弧?
I did not want to make a list, I wanted to create a tuple thank you for catching it. I want parens not square brackets there.
为什么这里有错误了,我并不想要创建,一个列表,我想创建一个元组,谢谢你,发现了这个错误。
Well at some level it is an ordered sequence of characters. Right? Now it is not represented this same way. You don't see strings inside these open parens and closed parens.
现在字符串不是用这种方式表达的,你没有看到字符串里有开括号闭括号,字符串中间也没有逗号,但是它有同样的属性。
All right. I hate this language, because I always want to have parens.
我讨厌这门语言,因为我总是得打括弧。
So STR, which I just typed up there, takes in parens, some input, and it converts it into a string, so that now I can use that John where I was expecting a string. John.
因此STR,也就是,我刚刚输入的,然后把这个输入变更为一个字符串,因此现在我就能,在需要用字符串的地方使用这个对象了。
应用推荐