Home  >  Article  >  Backend Development  >  How to define functions on the command line in python

How to define functions on the command line in python

尚
Original
2019-07-03 13:40:525943browse

How to define functions on the command line in python

The method of defining a function in Python on the command line is as follows:

Open the computer run window, enter cmd, and click OK

How to define functions on the command line in python

Command line window, enter python, enter the python command line, after writing the function, hit Enter twice, that is, the function is defined

How to define functions on the command line in python

The test function can be used normally

How to define functions on the command line in python

For more Python related technical articles, please visit the Python Tutorial column to learn!

The above is the detailed content of How to define functions on the command line in python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn