Skip to content
TheChatArchiveThe Chat Archive
gpt-4.1-mini-2025-04-14· OpenAIAi2 WildChat-4.8M (AI2)

show code in 20lines

  1. User

    show code in 20lines

  2. Assistant

    Sure! Here's a concise Python example that prints the first 10 Fibonacci numbers in under 20 lines:

    def fibonacci(n):
        fib_seq = [0, 1]
        for _ in range(2, n):
            fib_seq.append(fib_seq[-1] + fib_seq[-2])
        return fib_seq
    
    print(fibonacci(10))
    

    Let me know if you want code for a different task!