Given an integer n
as input, return a list containing n
, repeated n
times. For example, the program would take 5
and turn it into [5,5,5,5,5]
. The elements need to be integers, not strings. No built-in functions that accomplish the task are allowed.
This is code-golf, so standard rules apply.
built-in
. \$\endgroup\$*
operator ok? What's an example of a built-in that isn't ok? \$\endgroup\$