This Python code will generate a Fibonacci sequence either N numbers long, or up to a value N.