Python编程和 Lua编程的比较

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python编程和 Lua编程的比较相关的知识,希望对你有一定的参考价值。

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编程的比较的主要内容,如果未能解决你的问题,请参考以下文章