Home  >  Article  >  Backend Development  >  python syntax marshmallow description

python syntax marshmallow description

高洛峰
高洛峰Original
2017-03-09 09:42:062151browse

Quickly create list

>>> squares = [x**2 for x in range(1,10)]
>>> [n for n in range(1,100) if n%3==0]
>>> mybag = [' glass',' apple','green leaf ']
>>> [one.strip() for one in mybag]
>>> list(enumerate(mybag))

Performance and space

for key in _dict:
    pass

                                                                

The above is the detailed content of python syntax marshmallow description. 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