Đối số từ khóa trong hàm python là gì?
Trong bài viết này, chúng tôi sẽ đề cập đến tác dụng của ** (sao đôi/dấu hoa thị) và * (dấu sao/dấu hoa thị) đối với các tham số trong Python. Tại đây, chúng tôi cũng sẽ đề cập đến các ví dụ về args và kwargs trong Python. Chúng ta có thể chuyển một số lượng đối số khác nhau cho một hàm bằng các ký hiệu đặc biệt. Show Có hai ký hiệu đặc biệt
Các ký hiệu đặc biệt được sử dụng để truyền đối số. -
Python *args là gì?Cú pháp đặc biệt *args trong định nghĩa hàm trong python được sử dụng để truyền một số đối số có thể thay đổi cho một hàm. Nó được sử dụng để chuyển một danh sách đối số có độ dài thay đổi, không có từ khóa.
ví dụ 1 Chương trình Python để minh họa *args cho một số lượng đối số khác nhau trăn3First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks77 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks78____00 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks1 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks2 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks3 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks4 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks5 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks6 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks7____08 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks9
First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks78 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks01______102 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks03 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks02 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks05 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks02 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks07 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks08 đầu ra First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks8 ví dụ 2 Chương trình Python để minh họa *args với đối số phụ đầu tiên Python3First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks77 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks00 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks0 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks1 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks2____08 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks05 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks06 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks07 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks2 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks3 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks4 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks5 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks6 _______07____08____105____356 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks57
First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks78 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks01______102 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks03 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks02 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks05 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks02 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks07 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks08 đầu ra First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks Python **kwargs là gìCú pháp đặc biệt **kwargs trong định nghĩa hàm trong python được sử dụng để chuyển danh sách đối số có độ dài thay đổi được từ khóa. Chúng tôi sử dụng tên kwargs với ngôi sao đôi. Lý do là dấu sao kép cho phép chúng tôi chuyển qua các đối số từ khóa (và bất kỳ số nào trong số chúng)
ví dụ 1. Chương trình Python để minh họa *kwargs cho một số đối số từ khóa khác nhau. Ở đây **kwargs chấp nhận đối số có độ dài thay đổi được từ khóa được truyền bởi lệnh gọi hàm. for first='Geeks' đầu tiên là khóa và 'Geeks' là một giá trị. nói một cách đơn giản, những gì chúng tôi gán là giá trị và chúng tôi gán cho ai là chìa khóa. Python3First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks77 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks78____00 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks0 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks81 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks2 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks3 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks84 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks5 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks86 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks7 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks8 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks05 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks80 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks81 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks82
First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks83 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks84______485______486 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks87 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks85 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks89 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks770 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks85 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks86 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks08 đầu ra First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks0
ví dụ 2 Chương trình Python để minh họa **kwargs cho một số đối số từ khóa khác nhau với một đối số bổ sung. Tất cả đều giống nhau, nhưng có một thay đổi là chúng tôi chuyển đối số không phải từ khóa mà đối số vị trí có thể chấp nhận được (arg1 trong myFun). và các đối số từ khóa mà chúng tôi chuyển qua được chấp nhận bởi **kwargs. đơn giản phải không? Python3First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks77 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks00 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks0 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks0 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks81 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks2 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks3 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks84 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks5 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks86 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks7 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks8 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks05 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks80 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks81 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks82
First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks83 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks78 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks02 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks03 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks85 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks86 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks87 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks85 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks89 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks770 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks85 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks86 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks08 đầu ra First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks0 Sử dụng cả *args và **kwargs để gọi một hàmví dụ 1 Ở đây, chúng ta chuyển *args và **kwargs làm đối số trong hàm myFun. Bằng cách chuyển *args tới myFun đơn giản có nghĩa là chúng tôi chuyển các đối số vị trí và độ dài thay đổi được chứa bởi các đối số. vì vậy, "geeks" chuyển sang arge1 , "for" chuyển sang arg2 và "geeks" chuyển sang arg3. khi chúng tôi chuyển **kwargs làm đối số cho myFun, điều đó có nghĩa là nó chấp nhận đối số từ khóa. Ở đây, “arg1 là khóa và giá trị là “Geeks” được chuyển đến arge1, và cứ như vậy “for” và “Geeks” lần lượt chuyển đến arg2 và arg3. Sau khi chuyển tất cả dữ liệu, chúng tôi sẽ in tất cả dữ liệu theo dòng. trăn3First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks77 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks14 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks2____08 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks05 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks18 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks07 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks2______08 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks05 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks23 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks24 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks2______08 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks05 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks28 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks29
First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks30 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks31 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks32 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks85 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks05 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks35 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks02 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks37 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks02 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks35 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks08 _______178____00____043
First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks44 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks85 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks46 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks47 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks48 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks35 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks02 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks51 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks48 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks37 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks02 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks55 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks48 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks35 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks58 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks78 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks0____00 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks62 đầu ra First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks5 ví dụ 2 Ở đây, chúng ta chuyển *args và **kwargs làm đối số trong hàm myFun. trong đó 'geeks', 'for', 'geeks' được chuyển thành *args và first=”Geeks”, mid=”for”, last=”Geeks” được chuyển dưới dạng **kwargs và in trên cùng một dòng trăn3First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks77 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks78_______00 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks66 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks0 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks0 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks81 _______02____08____105____073 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks74 _______02____08____105____078 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks79
First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks80 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks81 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks78 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks83 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks02 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks89 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks02 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks83 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks03 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks85 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks35 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks87 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks85 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks37 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks770 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks85 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks35 First argument : Hello Next argument through *argv : Welcome Next argument through *argv : to Next argument through *argv : GeeksforGeeks08 Tại sao sử dụng đối số từ khóa?Có hai ưu điểm - một là, việc sử dụng hàm dễ dàng hơn vì chúng ta không cần lo lắng về thứ tự của các đối số . Hai, chúng ta chỉ có thể cung cấp giá trị cho những tham số mà chúng ta muốn, với điều kiện là các tham số khác có giá trị đối số mặc định.
4 loại đối số trong Python là gì?Trong Python, chúng ta có 4 loại đối số hàm sau. . Đối số mặc định Đối số từ khóa (đối số được đặt tên) đối số vị trí Đối số tùy ý (đối số có độ dài thay đổi *args và **kwargs ) 3 loại đối số trong Python là gì?Do đó, chúng tôi kết luận rằng Đối số hàm Python và ba loại đối số hàm của nó. Đây là- các đối số mặc định, từ khóa và tùy ý .
Loại đối số trong một chức năng là gì?Đối số lập trường
. Điều này được gọi là đối số vị trí. Các đối số từ khóa chỉ nên tuân theo các đối số vị trí. Ví dụ. thêm chắc chắn (a, b, c). trả về (a+b+c) |