Jul. 21st, 2024
2024年 6月 16日

Post: Python Cheatsheet

Python Cheatsheet

Published 08:08 Aug 02, 2020.

Created by @ezra. Categorized in #Programming, and tagged as #Cheatsheet.

Source format: Markdown

Table of Content

Python cheatsheet



# With *args you can pass on parameters 
# with already defined values
def myFun(*argv):
    for arg in argv:
        print (arg)

myFun('Hello', 'Welcome', 'to', 'GeeksforGeeks')

# with **kwargs you can add keyworded, variable-length 
# argument list as a paramter to a function
# One can think of the kwargs as being a dictionary that maps 
# each keyword to the value that we pass alongside it
def myFun(**kwargs):
    for key, value in kwargs.items():
        print ("%s == %s" %(key, value))

myFun(first ='Geeks', mid ='for', last='Geeks')  

# You can also combine args and kwargs together inside a paramter
def myFun(*args,**kwargs):
    print("args: ", args)
    print("kwargs: ", kwargs)


Python Folder Structure

-README -- basic readme - -- if you have configs - requirements.txt -- for pip dependencies - venv/ -- for virtualenv - /scripts -- for that kind of command-line interface stuff - /tests -- for your tests - /lib -- for your C-language libraries - /doc -- for most documentation - /apidoc -- for the Epydoc-generated API docs. - /appname or /src -- that has the main project code

Pinned Message
I'm looking for a SOFTWARE PROJECT DIRECTOR / SOFTWARE R&D DIRECTOR position in a fresh and dynamic company. I would like to gain the right experience and extend my skills while working in great teams and big projects.
Feel free to contact me.
For more information, please view online résumé or download PDF
本人正在寻求任职 软件项目经理 / 软件技术经理 岗位的机会, 希望加⼊某个新鲜⽽充满活⼒的公司。
如有意向请随时 与我联系
更多信息请 查阅在线简历下载 PDF