码迷,mamicode.com
首页 > 其他好文 > 详细

expression 和statement的区别

时间:2021-04-19 15:06:10      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:ack   overflow   区别   https   print   The   python   ons   bsp   

简单来说,expression是表达式,不是程序。 如 3 + 5,  (let b = 3) in b + 5

而statement,可以理解为最短的程序。 如 a = 3 + 5 ( let a = 3 + 5)

 

 

 

https://stackoverflow.com/questions/4728073/what-is-the-difference-between-an-expression-and-a-statement-in-python#:~:text=An%20expression%20evaluates%20to%20a,A%20statement%20does%20something.&text=Statements%20represent%20an%20action%20or%20command%20e.g%20print%20statements%2C%20assignment%20statements.&text=Expression%20is%20a%20combination%20of,that%20yields%20a%20result%20value.

expression 和statement的区别

标签:ack   overflow   区别   https   print   The   python   ons   bsp   

原文地址:https://www.cnblogs.com/simpleminds/p/14668633.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!