Python Forum
Format text and variables - more lines
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Format text and variables - more lines
#2
two examples (I would go for the first one):
print(f'string\n{variable}\n\nstring...')
print(f'''string
{variable}


string...''')
Is that what you were looking for?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
Format text and variables - more lines - by dan789 - Jan-08-2019, 01:39 PM
RE: Format text and variables - more lines - by buran - Jan-08-2019, 01:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Editing text between two string from different lines Paqqno 1 1,353 Apr-06-2022, 10:34 PM
Last Post: BashBedlam
  Extracting Specific Lines from text file based on content. jokerfmj 8 3,158 Mar-28-2022, 03:38 PM
Last Post: snippsat
  raspberry use scrolling text two lines together fishbone 0 1,485 Sep-06-2021, 03:24 AM
Last Post: fishbone
  More elegant way to remove time from text lines. Pedroski55 6 4,043 Apr-25-2021, 03:18 PM
Last Post: perfringo
  how to connect mysql from txt 1 line goes good but not all lines in text kingceasarr 4 2,955 Mar-24-2021, 05:45 AM
Last Post: buran
  Iterate 2 large text files across lines and replace lines in second file medatib531 13 6,114 Aug-10-2020, 11:01 PM
Last Post: medatib531
  Read Multiples Text Files get specific lines based criteria zinho 5 3,234 May-19-2020, 12:30 PM
Last Post: zinho
  How to detect the text above lines using OpenCV in Python pframe 0 2,545 Apr-14-2020, 09:53 AM
Last Post: pframe
  Can't seem to figure out how to delete several lines from a text file Cosmosso 9 4,267 Dec-10-2019, 11:09 PM
Last Post: Cosmosso
  variables from a text file vlk 2 2,291 Sep-22-2019, 06:44 PM
Last Post: vlk

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020