For the optional argument check it's also possible to do
seq=seqor[]
so if it's None it will assign an empty list or use seq otherwise.
Or are there any downsides with this approach?
E: Ok in case seq is already an empty list it will be reassigned anyway.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice writing.
For the optional argument check it's also possible to do
so if it's
None
it will assign an empty list or useseq
otherwise.Or are there any downsides with this approach?
E: Ok in case
seq
is already an empty list it will be reassigned anyway.