0

Print out an integer using print function in python without casting the integer to string

Python print function https://code.sololearn.com/cxWlTST4Anhm/?ref=app

22nd Aug 2022, 9:05 PM
Stephen Ayodele
Stephen Ayodele - avatar
3 Answers
+ 2
What is your try? What is your difficulty?
22nd Aug 2022, 9:34 PM
Jayakrishna 🇼🇳
0
Okay, I used the latest f-string syntax like this... print(f"{number} Battery street") when I was marked wrong, then I tried print(f"{int(number)} Battery street") Still not write
22nd Aug 2022, 9:54 PM
Stephen Ayodele
Stephen Ayodele - avatar
0
Both are fine and same. Where you getting it is wrong? another way : print(number,'Battery street')
22nd Aug 2022, 10:03 PM
Jayakrishna 🇼🇳