Giới thiệu về Functions trong Python
Hugo Bowne-Anderson
Instructor
Cách viết hàm
Nhận nhiều tham số
Trả về nhiều giá trị
Tiếp theo: Hàm phân tích dữ liệu Twitter
def raise_both(value1, value2):
"""Raise value1 to the power of value2
and vice versa."""
new_value1 = value1 ** value2
new_value2 = value2 ** value1
new_tuple = (new_value1, new_value2)
return new_tuple
Giới thiệu về Functions trong Python