码迷,mamicode.com
首页 > 编程语言 > 详细

Python编程和 Lua编程的比较

时间:2017-02-21 22:02:52      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:python   max   name   比较   bsp   span   python编程   between   res   

Python编程和 Lua编程的比较

2016.4.21


 

  1. 定义函数:
    • python:  
      def functionname( parameters ):
         "函数_文档字符串"
         function_suite
         return [expression]
    • lua:  
      --[[ function returning the max between two numbers --]]
      function max(num1, num2)
      
         if (num1 > num2) then
            result = num1;
         else
            result = num2;
         end
      
         return result; 
      end

 

 

  未完,待续……

 

Python编程和 Lua编程的比较

标签:python   max   name   比较   bsp   span   python编程   between   res   

原文地址:http://www.cnblogs.com/swje/p/5416538.html

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