-1

I'm having trouble figuring out how to print a very specific line.

I tried using .format and I also tried the print("str",variable,"str") method but I can't seem to figure out how to make it print correctly.

feet=5
inches=6

print('Room Length:{}' {}"'.format(feet,inches))

I want the computer to print; Room Length: 5' 6" but I am not sure how to print this while keeping the apostrophe and the quotations for feet and inches.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • 1
    Use slash: `Room Length:{}\' {}"'.format(feet,inches))` – Nouman Sep 17 '19 at 08:35
  • @cricket_007 Ah, you're right ! didn't notice that those were the markers for the inches and feet. Deleted my comment as it was clearly wrong. – fixatd Sep 17 '19 at 08:40

1 Answers1

2
print('Room Length:{}\' {}\"'.format(feet,inches))
moys
  • 7,747
  • 2
  • 11
  • 42