Home  >  Article  >  Backend Development  >  What does the python ipo model refer to?

What does the python ipo model refer to?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2020-01-06 11:01:1717733browse

What does the python ipo model refer to?

IPO (Input Processing Output) mode, that is, input data → process data → output results. For example:

# month.py
months="JanFebMarAprMayJunJulAugSepOctNovDec"
n=input("请输入月份数(1-12):")
tran=(int(n)-1)*3
monthAbbrev=months[tran:tran+3]
print("月份简写是:"+monthAbbrev+".")

Note: The input content is in string format. If the input is a numerical value, instructions such as int(), float() and complex() should be used to convert the input value (string type) is a numeric type.

If you want to directly get the input value of numeric type, you can use the eval_r() function to get the input result return value.

python learning network, free online learning python platform, welcome to pay attention!

The above is the detailed content of What does the python ipo model refer to?. 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