10 Levels of Writing Python Functions

Liu Zuo Lin
Python in Plain English
4 min readSep 6, 2022

--

cool art

1) Functions that take in zero parameters

def hello():
print("hello")
hello() # hello

2) Functions that take in 1 or more parameters

A function that takes in 1 parameter:

def add10(a):
return a + 10

--

--