I tried to do it with the languages that I know. Say I want n question marks...
Java:
StringBuffer buf = new StringBuffer("?");
for (int i = 2; i <= n; i++) {
buf.append(", ?");
}
result = buf.toString();
Groovy:
def s = ('?' * n).toList().join(', ');
Ruby:
s = ('?' * n).split(//).join(', ')