OK. So. Why did I do it? It's a simple example, I agree, but notice what I just did. It allowed me to highlight, is the code doing the right thing?
这是一个简单的例子,我同意,但是请注意我刚才是怎么做的,我通过它想要强调,代码是做了正确的?
This looks fine, right, I'm doing the right thing.
然后返回这个数组,如果我去运行这个程序。
I am the dancer and this is the dance I am doing and obviously they're not the same thing," right?
我就是舞者,这是我在跳的舞蹈,显然这二者不一样“,是吧?
Yeah, sadly it is still wrong t do the right thing and we still not doing all the right things.
是的,不幸的是阿富汗还没有走出错误的道路,那是因为我们没有做对,而且我们现在依然没有做对。,because,we,didn’
Well, what I always do in anything like this is, the first thing I do is, I run it on something where I can actually compute the answer in my head. So I get a sense of whether or not I'm doing the right thing.
好的,我常常在,这种问题中会做的是,我会做的第一件事是我,会先带入我可以心算的值来运行,因此我能够知道我是否做对了。
Because this is something that could certainly have screwed you up if you didn't realize it did it, and you need to have that discipline to make sure it's doing the right thing.
因为这是一件如果你没意识到,要这么做的话,可能会令你抓狂的一件事,你需要一个规范,来确定Python做了正确的事情。
应用推荐