Python 3 Tutorial

Source: Internet
Author: User

View Python version

We can use the following command to view the Python version we use in the command Window (Windows uses WIN+R to bring up the cmd run box):

-V

The results of the above command execution are as follows:

Python3.3.  2  
First python3.x Program

For most programming languages, the first starter code is "Hello world! ", the following code is for using Python output" Hello world! ":

Instance (Python 3.0+)#!/usr/bin/python3 print("Hello, world!" )

You can save the above code in the hello.py file and execute the script file using the Python command.

$ python3 Hello.  PY 

The above command outputs the result:

Hello, World!

1 opening the shell to create a new file

2 Adding a new file

#!/usr/bin/python3

Print ("Hello, world!")

3 run

Python 3 Tutorial

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: info-contact@alibabacloud.com 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.