Python Forum
How to print string multiple times on new line
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to print string multiple times on new line
#4
(Sep-30-2020, 12:54 PM)Naheed Wrote: print(*4*(("Hello " + name +" you will be 100yrs old in the year " + result + ". "), sep='("Hello " + name +" you will be 100yrs old in the year " + result + ". "')

Seriously? For start - it will raise SyntaxError...
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
RE: How to print string multiple times on new line - by buran - Sep-30-2020, 01:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem with spliting line in print akbarza 3 410 Jan-23-2024, 04:11 PM
Last Post: deanhystad
  splitting file into multiple files by searching for string AlphaInc 2 909 Jul-01-2023, 10:35 PM
Last Post: Pedroski55
  File "<string>", line 19, in <module> error is related to what? Frankduc 9 12,598 Mar-09-2023, 07:22 AM
Last Post: LocklearSusan
  Trying to loop through code to plot seaborn line plots across multiple subplots eyavuz21 0 1,696 Dec-05-2022, 10:46 AM
Last Post: eyavuz21
  Print the line before the corrent line tester_V 9 1,581 Nov-18-2022, 08:39 AM
Last Post: Gribouillis
  Writing string to file results in one character per line RB76SFJPsJJDu3bMnwYM 4 1,393 Sep-27-2022, 01:38 PM
Last Post: buran
  Remove a space between a string and variable in print sie 5 1,807 Jul-27-2022, 02:36 PM
Last Post: deanhystad
  Inserting line feeds and comments into a beautifulsoup string arbiel 1 1,194 Jul-20-2022, 09:05 AM
Last Post: arbiel
  Matching multiple parts in string fozz 31 6,360 Jun-13-2022, 09:38 AM
Last Post: fozz
  Can you print a string variable to printer hammer 2 1,967 Apr-30-2022, 11:48 PM
Last Post: hammer

Forum Jump:

User Panel Messages

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