📜  apa itu 鸭子打字 python 代码示例

📅  最后修改于: 2022-03-11 14:45:44.787000             🧑  作者: Mango

代码示例1
function calculate(a, b, c) => return (a+b)*c
 
example1 = calculate (1, 2, 3)
example2 = calculate ([1, 2, 3], [4, 5, 6], 2)
example3 = calculate ('apples ', 'and oranges, ', 3)
 
print to_string example1
print to_string example2
print to_string example3