This looks like homework, so I'll describe my answer in English instead of Python.
Use a list comprehension to create a list of n strings, selecting each element from either '1' (if the index of the item is i) and '0' (otherwise). Join the elements of the list with a space between them.
There are several ways you can select from two items based on a boolean value. One of them would be to have the two items in a sequence, and index the sequence with the boolean value, thus picking the first element if False, and the second element if True. In this particular case, you can also convert the boolean value to '0' or '1' in several ways (e.g. convert to integer and then to string).
I don't understand the new string[] comment -- that's not C++ syntax.
Edit
Here's the Python:
' '.join([('0', '1')[x == i - 1] for x in range(n)])
or
' '.join([str(int(x == i - 1)) for x in range(n)])
I like the former more -- it's quite clear that it generates zeros and ones, and they can be changed to something else with ease. It's i - 1 instead of i to adjust for i being one-based and x being zero-based. Normally, I wouldn't do that. All things being equal, I prefer to work with zero-based indices throughout, except when input and output formats demand one-based values. In that case, I convert inputs as soon as possible and outputs as late as possible, and definitely avoid mixing the two in the same bit of code.
You can safely drop the square brackets, turning the list comprehension into a generator comprehension. For most intents and purposes, they work the same.