0
How can I get two outputs to print on the same line?
Wrote the following code to practice OOP. The output is "Dekkion is a gold dragon" on the first line and "who breaths fire" on the second line. How can I get them to print next to each other (on one line)? I tried "\n.join" and other various Google answers, but no dice. Any help appreciated class dragon: def __init__(self, color, weapon): self.color = color self.weapon = weapon Dekkion = dragon("Dekkion is a gold dragon", "who can breath fire") print(Dekkion.color) print(Dekkion.weapon)
3 Answers
+ 3
Also try the search function.
See the answer by David Ashton
https://www.sololearn.com/Discuss/1439461/?ref=app
+ 2
print(Dekkion.color, Dekkion.weapon)
0
Thanks Louis and Diego:)!