simple python function example
Here's an example of a simple Python function that takes in two integers and returns their sum:
def add_numbers(x, y):
sum = x + y
return sum
To use this function, you can call it and pass in two integers:
result = add_numbers(2, 3)
print(result) # Output: 5
原文地址: https://www.cveoy.top/t/topic/f0SP 著作权归作者所有。请勿转载和采集!