Python Question
Python Question
Lists :
In Python, a list is a built-in data type that is used to store collections
of items.
Methods
Method Description
Append() Adds an item to the end
extend() Adds all items from another list
insert() Inserts an item at a specific index
remove() Removes first matching value
pop() Removes item at given index (default last)
sort() Sorts the list (in-place)
reverse() Reverses the list (in-place)
index() Returns index of first matching value
count() Counts occurrences of a value
clear() Removes all items from the list
How do you create a list?
my_list = [1, 2, 3]
empty_list = []
Tuples :
A tuple is an immutable, ordered, and indexable collection of elements.
Once created, you cannot change its elements.
Key Differences
Feature List Tuple
Dictionary:
In Python, a dictionary is a built-in data structure used to store collections of
data in key-value pairs. It allows for efficient retrieval of values based on
unique keys.
Creating a Set
my_set = {1, 2, 3, 4}
empty_set = set()
LLM :
• A large language model is a type of artificial intelligence algorithm that
applies neural network techniques with lots of parameters to process
and understand human languages or text using self-supervised learning
techniques.
• There are many techniques that were tried to perform natural language-
related tasks but the LLM is purely based on the deep learning
methodologies.
• Large Language Models (LLMs) operate on the principles of deep
learning, leveraging neural network architectures to process and
understand human languages.
• Examples: of such LLM models are Chat GPT by open AI, BERT
(Bidirectional Encoder Representations from Transformers) by Google,
etc.
• LLM = Large Language Model
• They are powerful tools for working with human language in a wide
range of applications
• Answering questions
• Translating languages
• Writing stories or code
• Summarizing text
• Chatbots
They are trained on huge text datasets (like books, websites, articles) using
machine learning to learn grammar, facts, reasoning, and context.
Python is the most commonly used language to interact with and build on top
of LLMs.
you use LLMs either through APIs or locally via libraries like transformers
GPT (Generative Pretrained Transformer) is a type of LLM. So, all GPTs are
LLMs, but not all LLMs are GPTs.
Pandas :
• Pandas is open-source Python library which is used for data
manipulation and analysis.
• pandas is an extension of Python to process and manipulate tabular
data, implementing operations such as loading, aligning, merging, and
transforming datasets efficiently.
• It provides data structures like DataFrames (tabular data) and Series
(one-dimensional arrays) that make it easier to work with structured
data.
It helps you:
import pandas as pd
OpenAI :
• OpenAI is a research organization and company that develops
advanced artificial intelligence (AI) systems — like chatGPT.
• OpenAI builds smart AI systems (like ChatGPT) that help people write,
learn, code, create images, and more — safely and responsibly.
• OpenAI is a research company that creates advanced AI tools to help
people with tasks like chatting, coding, writing, and more.
• Elon Musk
• Sam Altman
• Greg Brockman
• Ilya Sutskever
Whisper
copilot
Mostly:
Common ML Algorithms:
• Linear Regression
• Decision Trees
• K-Nearest Neighbors (KNN)
• Support Vector Machines (SVM)
• Neural Networks