+ 1
Format string
When i code on my phone, i can use the %f, %s etc. To desplay results. Example X = 6 Y = 7 Print("The First number is %i, the last number is %i", %(x , y) and it will display (The First number is 6, the last number is 7) But when i code on my rbp, over Thonny Python, it dont Work..? How come?
3 Respostas
+ 1
You're welcome!
+ 3
To format strings, you can use :
x = 6
y = 7
print("x={0}, y={1}".format(x, y))
#outputs x=6, y=7
+ 1
I Will try that! Thanks