Home > Backend Development > Python Tutorial > Python variable length parameters

Python variable length parameters

巴扎黑
Release: 2016-12-08 09:20:41
Original
1294 people have browsed it

I feel that Python’s variable-length parameters are quite easy to use. Record them for easy query.
def selectsql(self, sqlstr, *condition):
       arr = sqlstr.split("?")
                                                                                                                    for i in range (len(arr)-1):
        rs += arr[i] + str(condition[i])
                                                                                                                                        using   using   using   using using using           using using         through using ’ s ’ s ‐ ‐ ‐ ‐ sele(self, sqlstr, **condition): ​                                                print(key,condition[key])

Related labels:
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template