Question: Problems printing list content with printf command

Dear, 

Please, may I ask your help with the following problem? 

I have to print something like this: 

Days 4,5,6 is closed. 

4,5,6 is the content of a list.  I enter: 

d:=[4,5,6];

printf("Days %a is closed\n", d[]);

but Maple returns:

Days 4 is closed

Of course, if I enter  printf("Days %a, %a, %a is closed\n", d[]);

I get the correct result: Days 4,5,6 is closed. 

However, the numer of elements the list will have vary from case to case and according to the procedure I'm running so I cannot enter the command with the exact number of %a. How could I overcome this problem?

Many thanks for your help. 

 

Please Wait...