Python, python3

Source: Internet
Author: User

Python, python3

When I learned this day, I saw the python-I filaname command. The book says that this command can be used to execute the code in the filename file. However, an error is reported during use today. The problem is solved only after multiple tests.

It turns out that this command cannot be used in the pathon ide and is used in the console.

1. The Prime Minister created the aa. py file in C: \ Users \ Administrator \ Desktop \ python with the following content:

A = 1
B = 2
Print ('a + B = % d' % (a + B ))

2. log on to the console, go to the directory aa. py (you must enter the directory of the file, or the system cannot find the file), and enter python-I aa. py. The interface outputs the result.

3. Now we have entered the python editing mode. We can continue to execute the python command:

4. Enter exit () to exit python Editing:

 

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.