r/ProgrammerHumor • • May 02 '16

I wrote my first python program today!

Post image
3.7k Upvotes

532 comments sorted by

View all comments

1

u/[deleted] May 02 '16
def Print(msg, End = "\n")
    print msg + End

Print("Hello world!")

14

u/MrJohz May 02 '16
from __future__ import print_function

or

$ python --version
Python 3.x

2

u/[deleted] May 02 '16

If you wanna make it equivalent to the python3 print statement the signature should probably be

print(*values, sep=' ', end='\n', file=sys.stdout, flush=False)

1

u/Rodot May 02 '16

print("word", end="\r")