Python Forum
Print("") vs Print(end="\n")
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print("") vs Print(end="\n")
#1
While I tested, who fast some functions are, I tested the "print" function.
So I found out that print(end="\n") is faster.
Is there any reason then to use print("")
Reply
#2
There is no reason to use print('', end'\n') instead of plain print(''). Printing to the console is for human beings. We are unable to catch the difference. We are slow readers. This can't slow your program significantly.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Print a Pyramid Asterisk Pattern in Python? williamclark 0 1,050 Mar-24-2025, 10:05 AM
Last Post: williamclark
Smile Print Mystery Rchrd 3 1,395 Nov-10-2024, 01:51 AM
Last Post: Rchrd
  print/save on pdf starwhale 3 1,043 Nov-08-2024, 10:59 PM
Last Post: Gribouillis
  print in shell: b ??? trix 18 3,615 Aug-30-2024, 04:36 PM
Last Post: trix
  Print text with big font and style tomtom 6 21,273 Aug-13-2024, 07:26 AM
Last Post: yazistilleriio
  XML minidom "Pretty Print" Lost Data marksy95 2 1,404 Jun-15-2024, 11:09 AM
Last Post: Larz60+
  Print the next 3 lines knob 3 1,257 May-22-2024, 12:26 PM
Last Post: andraee
  Cannot get cmd to print Python file Schauster 11 3,555 May-16-2024, 04:40 PM
Last Post: xMaxrayx
  Odd Print Behavior tanner_1011 3 1,089 May-07-2024, 06:46 PM
Last Post: deanhystad
  How can I print from within actor(func) ?? Pedroski55 2 1,035 May-01-2024, 05:35 AM
Last Post: Pedroski55

Forum Jump:

User Panel Messages

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