Python's +
operator can be used to concatenate two sequences of the same type.
For concatenating a sequence with itself, Python has the *
operator. Given a sequence and an integer,
the *
computes the concatenation of that many copies of the sequence (or an empty sequence if the
integer is nonpositive). For example, both ' ' * 8
and 8 * ' '
produce a string
containing eight spaces. The preferred style is to write the number second.
Fill in the placeholders so that the actual outputs match the expected outputs. (As a reminder, strings inside of an
single-quoted f
-string must be written with double quotes.)