Saturday, April 20, 2024

📑 Arguments of Named Tuples

📑 Task

1) What will be the result of executing the code?
2) Can you modify this function so that
the argument names of named tuples would be small Latin letters?
And if the number of arguments is more than 26
then the program would issue a warning "Use less than 26 arguments"?

📑 Answer

1) vector() vector(x1=1) vector(x1=1, x2=2)
This function creates named tuples "vector"
with an arbitrary number of arguments x1, x2, etc.
2)

No comments:

Post a Comment