# code-block-pro/1.27.5/build/shiki/samples/python.sample

Code Block Pro – Beautiful Syntax Highlighting, version 1.27.5. 12 lines.

- Page: https://pluginprobe.com/plugins/code-block-pro/1.27.5/code/build/shiki/samples/python.sample
- Raw: https://pluginprobe.com/plugins/code-block-pro/1.27.5/raw/build/shiki/samples/python.sample
- Modified: 2022-08-22T22:25:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-block-pro/1.27.5/code/build/shiki/samples/python.sample#L10-L20`.

```
def fib(n):    # write Fibonacci series up to n
    """Print a Fibonacci series up to n."""
    a, b = 0, 1
    while a < n:
        print(a, end=' ')
        a, b = b, a+b
    print()

# Now call the function we just defined:
fib(2000)

# From https://docs.python.org/3/tutorial/controlflow.html#defining-functions
```
