The square brackets aren't intended to by typed into your code. They just indicate that n
is an optional parameter.
This style is recommended in the Documenting Python guide:
function
Describes a module-level function. The signature should include the parameters, enclosing optional parameters in brackets. Default values can be given if it enhances clarity. For example: