How can I print variable and string on same line in Python?
Use , to separate strings and variables while printing: print(“If there was a birth every 7 seconds, there would be: “, births, “births”) , in print function separates the items by a single space: >>> print(“foo”, “bar”, “spam”) foo bar spam or better use string formatting: print(“If there was a birth every 7 seconds, there … Read more