Source code for CrackingCodes.Ch09.passingReference
"""Passing references in a function
Demonstrates how to pass a reference to a function.
"""
[docs]def eggs(someParameter: list) -> None:
"""Append to a parameter.
Appends 'Hello' to a given parameter.
Args:
someParameter: List of elements.
Returns:
None. Only appends a string to a provided parameter.
"""
someParameter.append('Hello')
if __name__ == '__main__':
main()