Python Functions, Packing, and Unpacking Packing and Unpacking Packing Challenge

Adriana Alvear
Adriana Alvear
1,538 Points

What does it mean the word 'pass' in the packing.py challenge?

What does it mean the word 'pass' in the packing.py challenge?

packing.py
def packer(param1, param2, param3):
    pass

packer('Functions', 'are', 'fun!')

2 Answers

KRIS NIKOLAISEN
KRIS NIKOLAISEN
53,389 Points

From the docs

pass is a null operation -- when it is executed, nothing happens. It is useful as a placeholder when a statement is required syntactically, but no code needs to be executed

In the code you posted, without it packer('Functions', 'are', 'fun!') causes an indentation error because Python would think the line is meant to be part of the function.