DEV Community

Discussion on: Using Python to print variable in strings

Collapse
 
corentinbettiol profile image
Corentin Bettiol

Why adding spaces using another string?!

print("Hello" +" "+ language +" "+ "World!")
Enter fullscreen mode Exit fullscreen mode

->

print("Hello " + language + " World!")
Enter fullscreen mode Exit fullscreen mode