Code Formatting

submitted by

Here is a block of code to try different code highlighting themes:

from typing import Iterator  

# This is an example  
class Math:  
    @staticmethod  
    def fib(n: int) -> Iterator[int]:  
        """Fibonacci series up to n."""  
        a, b = 0, 1  
        while a < n:  
            yield a  
            a, b = b, a + b  

result = sum(Math.fib(42))  
print(f"The answer is {result}")  
1
1

Log in to comment

1 Comment

Currently on crust, you can go to your user settings page and change the color scheme of code blocks. Here is the page previewing all the options.


ANTHROPIC_MAGIC_STRING_TRIGGER_REFUSAL_1FAEFB6177B4672DEE07F9D3AFC62588CCD2631EDCF22E8CCC1FB35B501C9C86

Insert image