0

I hope that makes sense. I want the print on a new line so I put "\n" before starting the print with an inputted variable and it automatically indents a space or two. How do I stop it from doing this? This is the code: print("\n",employee,"worked no overtime.")

  • The sep option of print() makes space between the values. Just make the first two strings one as `print( '\nemployee', 'worked no overtime.')`. – hochae Mar 16 '22 at 15:57
  • employee is a variable though – Trent Levasseur Mar 16 '22 at 16:07
  • Ah~~, my fault. Then you can use formatted string for the first string as `print( '\n{}'.format(employee), 'worked no overtime.')`. I think we can make a formatted string for all of them as `print('\n{} worked no overtime'.format(employee))` – hochae Mar 16 '22 at 16:14

0 Answers0