Hello; I'm a new student of Python using "Python Programming for Absolute Beginners" 3rd edition by Michael Dawson as my guide. This is a basic question regarding spaces. I'm not sure how to make it so spaces do not show up between variables and basic strings, particularly before commas and after dollar signs, as in the simple "tipper" program I have below.
____________________________ #Tip program: calculates 15% and 20% tip for a given bill. bill = int(input("Hello! Welcome to the tipper program. \nWhat is the amount of " "your bill, in dollars please: ")) percent15 = bill * .15 percent20 = bill * .20 print("\nOkay, based on that bill, a 15% tip would be $", percent15, ", and \n" "a 20% tip would be $", percent20, ".") input("\n\nPress the enter key to exit.") ____________________________ As you can see, this is quite rudimentary; I have not discovered any special function that eliminates spaces yet, if such a function exits. The problem is, as stated above, unwanted spaces after both dollar signs, before the comma after '15.0' and before the period after '20.0." Apologies for asking such a basic question, but any help will be appreciated. -Alex
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor