Answer the question
In order to leave comments, you need to log in
How to output multiple variable values from a new line?
model = 1
color = "black"
year = 2010
number_of_doors = 6
print(model, \n color, \n year, \n number_of_doors)
Answer the question
In order to leave comments, you need to log in
Strings
model = 1
color = "black"
year = 2010
number_of_doors = 6
print(str(model) + "\n" + color + "\n" + str(year) + "\n" + str(number_of_doors))
print('####')
print("%d\n%s\n%d\n%d" % (model, color, year, number_of_doors))
print('####')
print(f"{model}\n" \
f"{color}\n" \
f"{year}\n" \
f"{number_of_doors}")
print("####")
print(f"{model}\n{color}\n{year}\n{number_of_doors}")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question