str_data={'A', 'B', 'C'}
joined_str="and".'Code (str_data)
print(joined_str)
Output value:
B and A and C
Shouldn't we say "reverse" to the "code"?
python
Hello.
First of all, reverse
is a function that reverses the order of array elements. str_data
, i.e., the BAC shape will not appear even if you flip the BAC.
Since the output value is connected by "and"
and the character is at the beginning of 'code'
, it seems that the intention of the problem is to use a function that pastes the element of the array as a single string. Just give them a hint as the title says.
But if you just stick it on, it will be in the form of "A and B and C"
. If you need to modify the 'code'
part to derive the output value, I think the problem is a little wrong.
© 2025 OneMinuteCode. All rights reserved.