Click a button below to start learning about Python or LangChain basics.
Variables store data values. In Python, you don't need to declare the type:
x = 5
name = "Alice"
pi = 3.14
print(x, name, pi)
Functions are blocks of code that run when called:
def greet(name):
print("Hello,", name)
greet("Biswa")
Loops let you repeat code. Example with a for loop:
fruits = ["apple", "banana", "cherry"]
for fruit in fruits:
print(fruit)
Lists store multiple items in one variable:
numbers = [1, 2, 3, 4]
print(numbers[2]) # Output: 3
LangChain is a Python framework for building applications powered by Large Language Models (LLMs) like GPT.
pip install langchain
from langchain.llms import OpenAI
llm = OpenAI()
response = llm("What is LangChain?")
print(response)