0
y the output for the third one is {a+25}{a+25}? y not 5050
a=25 print(a+25) print("{a+25}"*2)
3 Respostas
+ 2
(python)
when you multiply a String in python python just extends the String as many times with it's self.
+ 2
if you write:
a = 25
print(str(a+25)*2)
then the output will be "5050"
+ 2
You might be searching for the format method.
"{a+25}".format(...)