def fruit(*fruits):
if "apple" in fruits :
print("RED")
print(*fruits)
fruit('banana', 'apple', 'mango')
In the code that inputs fruits with variable factors and outputs RED if there is an apple during *fruit, the error is It doesn't show, but the output is
RED
banana apple mango
That's what it says. By the way, I'm
banana
apple
RED
mango
You can't even use \n to make a line between words. I want it to be printed like this, so how can I fix it??
python
It's too basic. What was difficult?
for f in fruits:
print(f)
© 2025 OneMinuteCode. All rights reserved.