Python Road Python3 "0th" Python2 & Python3 Difference Continuous Update ~

Source: Internet
Author: User

def Print(Self, *args, sep=' ', end='\ n', File=none):#known special case of print    """print (value, ..., sep= ', end= ' \ n ', File=sys.stdout, Flush=false) Prints the values to a stream, or to Sys    . StdOut by default. Optional keyword arguments:file:a file-like object (stream);    Defaults to the current sys.stdout.    Sep:string inserted between values, default a space.    End:string appended after the last value, default a newline.    Flush:whether to forcibly flush the stream. """    Pass

Print in Python2 is a statement that you can output by placing it on the print keyword.

As you can see from the above code in Python3, he is now a function, just like any other function, and print () needs to pass the content you want to output as a parameter to him.

Python Road Python3 "0th" Python2 & Python3 Difference Continuous Update ~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.