Pertimbangkan situasi dimana kita memiliki fungsi yang menerima argumen.- Contoh def healt(age, apple_ate, cigs):total = (100-age) + (apple_ate * 3.5) - (cigs*2)print(total)nic = [16, 10, 0]healt(nic[0], nic[1], nic[2])healt(*nic)- Output 119.0119.0
PYTHON TUTORIAL - UNPACKING ARGUMENT
Reviewed by Computer Game Code
on
March 25, 2018
Rating: 5
No comments: