Unit_1
Unit_1
Introduction to Python, Types, Expressions & Variables, String Operations, Lists & Tuples, Sets,
Dictionaries, Conditions & Branching, Loops, Functions, Objects & Classes
String Operations
Looping Through a String Since strings are arrays, we can loop through the characters in a string,
with a for loop.
for x in "banana":
print(x,end=' ')
b a n a n a
str="ranjith"
print(len(str))
txt = "The best things in life are free!"
if "free" in txt:
print("Yes, 'free' is present.")
7
Yes, 'free' is present.
True
Slicing
You can return a range of characters by using the slice syntax.Specify the start index and the end
index, separated by a colon, to return a part of the string.
b = "Hello, World!"
print(b[2:5])
#slice from start
print(b[:3])
#slice to end
print(b[2:])
#Negative Indexing
print(b[-5:-2])
llo
Hel
llo, World!
orl
HELLO, WORLD!
hello, world!
Hello, World!
Hello, World!
Jello, World!
['Hello', 'World!']
#String Concatenation
a = "Hello"
b = "World"
c = a + b
print(c)
#String Format
age = 36
# txt = "My name is John, I am " + age ##TypeError: can only
concatenate str (not "int") to str
#F-Strings
txt = f"My name is John, I am {age}"
print(txt)
My name is John, I am 36
Placeholders and Modifiers A placeholder can contain variables, operations, functions, and
modifiers to format the value.
A placeholder can include a modifier to format the value. A modifier is included by adding a
colon : followed by a legal formatting type, like .2f which means fixed point number with 2
decimals:
price = 59
txt = f"The price is {price:.2f} dollars"
print(txt)
It's alright.
This will insert one \ (backslash).
Hello
World!
World!
HelloWorld!
Hello
Hello
Python Lists
List Items List items are ordered, changeable, and allow duplicate values.
List items are indexed, the first item has index [0], the second item has index [1] etc.
Ordered
When we say that lists are ordered, it means that the items have a defined order, and that order
will not change.
If you add new items to a list, the new items will be placed at the end of the list.
Note: There are some list methods that will change the order, but in general: the order of the
items will not change. Changeable The list is changeable, meaning that we can change, add, and
remove items in a list after it has been created.
Allow Duplicates
Since lists are indexed, lists can have items with the same value:
banana
cherry
['cherry', 'orange', 'kiwi']
['apple', 'banana', 'cherry', 'orange']
Yes, 'apple' is in the fruits list
# Append Items
thislist = ["apple", "banana", "cherry"]
thislist.append("orange")
print(thislist)
# Insert Items
thislist = ["apple", "banana", "cherry"]
thislist.insert(1, "orange")
print(thislist)
# Extend List
thislist = ["apple", "banana", "cherry"]
tropical = ["mango", "pineapple", "papaya"]
thislist.extend(tropical)
print(thislist)
# Add Any Iterable
thislist = ["apple", "banana", "cherry"]
thistuple = ("kiwi", "orange")
thislist.extend(thistuple)
print(thislist)
['apple', 'cherry']
['apple', 'cherry', 'banana', 'kiwi']
['apple', 'cherry']
['banana', 'cherry']
[]
apple
banana
cherry
apple
banana
cherry
apple
banana
cherry
Python - List Comprehension List comprehension offers a shorter syntax when you want to
create a new list based on the values of an existing list.
Example:
Based on a list of fruits, you want a new list, containing only the fruits with the letter "a" in the
name.
Without list comprehension you will have to write a for statement with a conditional test inside:
fruits = ["apple", "banana", "cherry", "kiwi", "mango"]
newlist = []
for x in fruits:
if "a" in x:
newlist.append(x)
print(newlist)
#with list comprehension
fruits = ["apple", "banana", "cherry", "kiwi", "mango"]
print(newlist)
# newlist = [expression for item in iterable if condition == True]
##syntax
Copy a List You cannot copy a list simply by typing list2 = list1, because: list2 will only be a
reference to list1, and changes made in list1 will automatically also be made in list2.
for x in list2:
list1.append(x)
print(list1)
# method 3
list1 = ["a", "b" , "c"]
list2 = [1, 2, 3]
list1.extend(list2)
print(list1)
Python Tuples
Tuple
Tuple is one of 4 built-in data types in Python used to store collections of data, the other 3 are
List, Set, and Dictionary, all with different qualities and usage.
Tuple Items
Tuple items are indexed, the first item has index [0], the second item has index [1] etc.
Ordered
When we say that tuples are ordered, it means that the items have a defined order, and that
order will not change.
Unchangeable
Tuples are unchangeable, meaning that we cannot change, add or remove items after the tuple
has been created.
Allow Duplicates
Since tuples are indexed, they can have items with the same value:
# Tuple Length
thistuple = ("apple", "banana", "cherry")
print(len(thistuple))
# Create Tuple With One Item
thistuple = ("apple",)
print(type(thistuple))
#NOT a tuple
thistuple = ("apple")
print(type(thistuple))
# It is also possible to use the tuple() constructor to make a tuple.
thistuple = tuple(("apple", "banana", "cherry")) # note the double
round-brackets
print(thistuple)
3
<class 'tuple'>
<class 'str'>
('apple', 'banana', 'cherry')
print(x)
#any update operation can be done by converting into list and again
convert back into tuple
# The del keyword can delete the tuple completely:
thistuple = ("apple", "banana", "cherry")
del thistuple
# print(thistuple) #this will raise an error because the tuple no
longer exists
print(green)
print(yellow)
print(red)
# Using Asterisk*
fruits = ("apple", "banana", "cherry", "strawberry", "raspberry")
print(green)
print(yellow)
print(red)
apple
banana
cherry
apple
banana
['cherry', 'strawberry', 'raspberry']
Python Sets
Note: Sets are unordered, so you cannot be sure in which order the items will appear.
Set Items
Set items are unordered, unchangeable, and do not allow duplicate values.
Unordered
Unordered means that the items in a set do not have a defined order.
Set items can appear in a different order every time you use them, and cannot be referred to by
index or key.
Unchangeable
Set items are unchangeable, meaning that we cannot change the items after the set has been
created.
Once a set is created, you cannot change its items, but you can remove items and add new items.
print(len(thisset))
# It is also possible to use the set() constructor to make a set.
thisset = set(("apple", "banana", "cherry")) # note the double round-
brackets
print(thisset)
# Change Items
# Once a set is created, you cannot change its items, but you can add
new items.
thisset.add("orange")
print(thisset)
# Add Sets
# Add elements from tropical into thisset:
thisset.update(tropical)
print(thisset)
# Add Any Iterable
thisset = {"apple", "banana", "cherry"}
mylist = ["kiwi", "orange"]
thisset.update(mylist)
print(thisset)
thisset.remove("banana")
print(thisset)
# Note: If the item to remove does not exist, remove() will raise an
error.
thisset = {"apple", "banana", "cherry"}
thisset.discard("banana")
print(thisset)
# Note: If the item to remove does not exist, discard() will NOT raise
an error.
# Remove a random item by using the pop() method:
x = thisset.pop()
print(x)
print(thisset)
# The clear() method empties the set:
thisset.clear()
print(thisset)
# The del keyword will delete the set completely:
del thisset
{'cherry', 'apple'}
{'cherry', 'apple'}
cherry
{'banana', 'apple'}
set()
Python Dictionaries
Dictionary
As of Python version 3.7, dictionaries are ordered. In Python 3.6 and earlier, dictionaries are
unordered.
Dictionaries are written with curly brackets, and have keys and values:
Accessing Items
thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
x = thisdict["model"]
print(x)
# Get the value of the "model" key:
x = thisdict.get("model")
print(x)
x = thisdict.keys()
print(x)
# Get a list of the values:
x = thisdict.values()
print(x)
# Check if Key Exists
thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
if "model" in thisdict:
print("Yes, 'model' is one of the keys in the thisdict dictionary")
Mustang
Mustang
dict_keys(['brand', 'model', 'year'])
dict_values(['Ford', 'Mustang', 1964])
Yes, 'model' is one of the keys in the thisdict dictionary
thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
thisdict["year"] = 2018
print(thisdict)
# Update the "year" of the car by using the update() method:
thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
thisdict.update({"year": 2020})
print(thisdict)
# Adding Items
thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
thisdict["color"] = "red"
print(thisdict)
# Add a color item to the dictionary by using the update() method:
thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
thisdict.update({"color": "orange"})
print(thisdict)
2.1 Encapsulation
Encapsulation means bundling data (attributes) and methods (functions) that operate on the
data into a single unit (class). It also allows you to restrict direct access to some attributes to
protect data.
Implementation in Python:
class Bike:
def __init__(self, name, gear):
self.name = name
self.__gear = gear # Private attribute
bike = Bike("Duke", 6)
print(bike.get_gear()) # Access private variable: 6
bike.set_gear(5)
print(bike.get_gear()) # Modified private variable: 5
6
5
2.2 Inheritance
Inheritance allows a class (child) to inherit attributes and methods from another class (parent),
promoting code reuse.
Types of Inheritance:
1.Single Inheritance:
class Parent:
def greet(self):
print("Hello from Parent")
class Child(Parent):
pass
child = Child()
child.greet() # Output: Hello from Parent
class Parent1:
def method(self):
print("Method from Parent1")
class Parent2:
def method(self):
print("Method from Parent2")
obj = Child()
obj.method() # Output: Method from Parent1 (due to Method Resolution
Order)
# 3.Multilevel inheritence
class GrandParent:
def method(self):
print("Grandparent method")
class Parent(GrandParent):
pass
class Child(Parent):
pass
obj = Child()
obj.method() # Output: Grandparent method
Grandparent method
2.3 Polymorphism
Polymorphism allows objects of different classes to be treated the same way based on shared
methods or behaviors.
Forms of Polymorphism:
1.Method Overriding (Runtime Polymorphism): A child class provides its own implementation for
a method inherited from the parent class.
class Parent:
def greet(self):
print("Hello from Parent")
class Child(Parent):
def greet(self):
print("Hello from Child")
obj = Child()
obj.greet() # Output: Hello from Child
2.Python doesn't support method overloading directly, but it can be achieved with default
arguments or *args.
class Calculator:
def add(self, a, b=0):
return a + b
calc = Calculator()
print(calc.add(10)) # Output: 10
print(calc.add(10, 20)) # Output: 30
10
30
3.Operator Overloading: Using special methods to redefine operators for custom classes.
class Vector:
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return f"Vector({self.x}, {self.y})"
v1 = Vector(2, 3)
v2 = Vector(1, 4)
print(v1 + v2) # Output: Vector(3, 7)
Vector(3, 7)
2.4 Abstraction
Abstraction hides implementation details and only shows essential information. It can be
achieved in Python using abstract base classes (ABC).
class Shape(ABC):
@abstractmethod
def area(self):
pass
class Circle(Shape):
def __init__(self, radius):
self.radius = radius
def area(self):
return 3.14 * self.radius * self.radius
circle = Circle(5)
print(circle.area()) # Output: 78.5
class Custom:
def __init__(self, value):
self.value = value
def __str__(self):
return f"Custom({self.value})"
obj = Custom(10)
print(obj) # Output: Custom(10)
Custom(10)
class Bike:
def __init__(self, name="Default", gear=1):
self.name = name
self.gear = gear
@classmethod
def electric_bike(cls):
return cls("Electric Bike", 0)
bike1 = Bike()
bike2 = Bike.electric_bike()
Default 1
Electric Bike 0
class Example:
counter = 0
@classmethod
def increment_counter(cls):
cls.counter += 1
return cls.counter
class Person:
def __init__(self, name, age):
self.name = name
self.age = age
@classmethod
def from_string(cls, data_string):
name, age = data_string.split(',')
return cls(name, int(age))
1
2
3
John
30
class Example:
def __init__(self):
self.public = "Public"
self._protected = "Protected"
self.__private = "Private"
obj = Example()
print(obj.public) # Output: Public
print(obj._protected) # Output: Protected
# print(obj.__private) # Error
Public
Protected
# Usage
acc = Account("Ranjith", 1000)
acc.deposit(500) # Output: 500 deposited. New balance is 1500.
acc.withdraw(2000) # Output: Insufficient funds!
print(acc.get_balance()) # Output: 1500
Python Functions
Creating a Function
Arguments
The following example has a function with one argument (fname). When the function is called,
we pass along a first name, which is used inside the function to print the full name:
def my_function(fname):
print(fname + " Refsnes")
my_function("Emil")
my_function("Tobias")
my_function("Linus")
Emil Refsnes
Tobias Refsnes
Linus Refsnes
Parameters or Arguments?
The terms parameter and argument can be used for the same thing: information that are passed
into a function.
A parameter is the variable listed inside the parentheses in the function definition.
Number of Arguments
By default, a function must be called with the correct number of arguments. Meaning that if your
function expects 2 arguments, you have to call the function with 2 arguments, not more, and not
less.
my_function("Emil", "Refsnes")
# If you try to call the function with 1 or 3 arguments, you will get
an error:
If you do not know how many arguments that will be passed into your function, add a * before
the parameter name in the function definition.
This way the function will receive a tuple of arguments, and can access the items accordingly:
my_function("Emil","Tobias", "Linus")
Keyword Arguments
You can also send arguments with the key = value syntax.
If you do not know how many keyword arguments that will be passed into your function, add
two asterisk: ** before the parameter name in the function definition.
This way the function will receive a dictionary of arguments, and can access the items
accordingly:
def my_function(**kid):
print("His last name is " + kid["lname"])
Position-only parameters can only be provided by their position in the argument list, not by their
name. To specify that parameters are position-only, a / is used in the function definition.
func(1,2,3)
func(1,2,c=3)
# In this example:
# Valid calls:
greet("John", "Doe") # Output: Hello, John Doe!
# Invalid call:
# greet(first_name="John", last_name="Doe") # Raises TypeError
1 2 3
1 2 3
Hello, John Doe!
# In this example:
# Both a and b are keyword-only parameters.
# Valid call:
greet(first_name="John", last_name="Doe") # Output: Hello, John Doe!
# Invalid call:
# greet("John", "Doe") # Raises TypeError
# Valid calls:
config(1, 2, z=3) # Output: x=1, y=2, z=3
# Invalid calls:
# config(x=1, y=2, z=3) # Raises TypeError
# config(1, 2, 3) # Raises TypeError
21
ERROR: pip's dependency resolver does not currently take into account
all the packages that are installed. This behaviour is the source of
the following dependency conflicts.
streamlit 1.32.0 requires packaging<24,>=16.8, but you have packaging
24.1 which is incompatible.
Collecting notebook-as-pdf
Using cached notebook_as_pdf-0.5.0-py3-none-any.whl.metadata (2.4
kB)
Requirement already satisfied: nbconvert in c:\users\ranjith\
anaconda3\lib\site-packages (from notebook-as-pdf) (7.10.0)
Collecting pyppeteer (from notebook-as-pdf)
Using cached pyppeteer-2.0.0-py3-none-any.whl.metadata (7.1 kB)
Collecting PyPDF2 (from notebook-as-pdf)
Using cached pypdf2-3.0.1-py3-none-any.whl.metadata (6.8 kB)
Requirement already satisfied: beautifulsoup4 in c:\users\ranjith\
anaconda3\lib\site-packages (from nbconvert->notebook-as-pdf) (4.12.3)
Requirement already satisfied: bleach!=5.0.0 in c:\users\ranjith\
anaconda3\lib\site-packages (from nbconvert->notebook-as-pdf) (4.1.0)
Requirement already satisfied: defusedxml in c:\users\ranjith\
anaconda3\lib\site-packages (from nbconvert->notebook-as-pdf) (0.7.1)
Requirement already satisfied: jinja2>=3.0 in c:\users\ranjith\
anaconda3\lib\site-packages (from nbconvert->notebook-as-pdf) (3.1.4)
Requirement already satisfied: jupyter-core>=4.7 in c:\users\ranjith\
appdata\roaming\python\python312\site-packages (from nbconvert-
>notebook-as-pdf) (5.7.2)
Requirement already satisfied: jupyterlab-pygments in c:\users\
ranjith\anaconda3\lib\site-packages (from nbconvert->notebook-as-pdf)
(0.1.2)
Requirement already satisfied: markupsafe>=2.0 in c:\users\ranjith\
anaconda3\lib\site-packages (from nbconvert->notebook-as-pdf) (2.1.3)
Requirement already satisfied: mistune<4,>=2.0.3 in c:\users\ranjith\
anaconda3\lib\site-packages (from nbconvert->notebook-as-pdf) (2.0.4)
Requirement already satisfied: nbclient>=0.5.0 in c:\users\ranjith\
anaconda3\lib\site-packages (from nbconvert->notebook-as-pdf) (0.8.0)
Requirement already satisfied: nbformat>=5.7 in c:\users\ranjith\
anaconda3\lib\site-packages (from nbconvert->notebook-as-pdf) (5.9.2)
Requirement already satisfied: packaging in c:\users\ranjith\appdata\
roaming\python\python312\site-packages (from nbconvert->notebook-as-
pdf) (24.1)
Requirement already satisfied: pandocfilters>=1.4.1 in c:\users\
ranjith\anaconda3\lib\site-packages (from nbconvert->notebook-as-pdf)
(1.5.0)
Requirement already satisfied: pygments>=2.4.1 in c:\users\ranjith\
appdata\roaming\python\python312\site-packages (from nbconvert-
>notebook-as-pdf) (2.18.0)
Requirement already satisfied: tinycss2 in c:\users\ranjith\anaconda3\
lib\site-packages (from nbconvert->notebook-as-pdf) (1.2.1)
Requirement already satisfied: traitlets>=5.1 in c:\users\ranjith\
appdata\roaming\python\python312\site-packages (from nbconvert-
>notebook-as-pdf) (5.14.3)
Requirement already satisfied: appdirs<2.0.0,>=1.4.3 in c:\users\
ranjith\anaconda3\lib\site-packages (from pyppeteer->notebook-as-pdf)
(1.4.4)
Requirement already satisfied: certifi>=2023 in c:\users\ranjith\
anaconda3\lib\site-packages (from pyppeteer->notebook-as-pdf)
(2024.6.2)
Requirement already satisfied: importlib-metadata>=1.4 in c:\users\
ranjith\anaconda3\lib\site-packages (from pyppeteer->notebook-as-pdf)
(7.0.1)
Collecting pyee<12.0.0,>=11.0.0 (from pyppeteer->notebook-as-pdf)
Using cached pyee-11.1.1-py3-none-any.whl.metadata (2.8 kB)
Requirement already satisfied: tqdm<5.0.0,>=4.42.1 in c:\users\
ranjith\anaconda3\lib\site-packages (from pyppeteer->notebook-as-pdf)
(4.66.4)
Collecting urllib3<2.0.0,>=1.25.8 (from pyppeteer->notebook-as-pdf)
Using cached urllib3-1.26.20-py2.py3-none-any.whl.metadata (50 kB)
Collecting websockets<11.0,>=10.0 (from pyppeteer->notebook-as-pdf)
Using cached websockets-10.4.tar.gz (84 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: six>=1.9.0 in c:\users\ranjith\
anaconda3\lib\site-packages (from bleach!=5.0.0->nbconvert->notebook-
as-pdf) (1.16.0)
Requirement already satisfied: webencodings in c:\users\ranjith\
anaconda3\lib\site-packages (from bleach!=5.0.0->nbconvert->notebook-
as-pdf) (0.5.1)
Requirement already satisfied: zipp>=0.5 in c:\users\ranjith\
anaconda3\lib\site-packages (from importlib-metadata>=1.4->pyppeteer-
>notebook-as-pdf) (3.17.0)
Requirement already satisfied: platformdirs>=2.5 in c:\users\ranjith\
appdata\roaming\python\python312\site-packages (from jupyter-
core>=4.7->nbconvert->notebook-as-pdf) (4.2.2)
Requirement already satisfied: pywin32>=300 in c:\users\ranjith\
anaconda3\lib\site-packages (from jupyter-core>=4.7->nbconvert-
>notebook-as-pdf) (305.1)
Requirement already satisfied: jupyter-client>=6.1.12 in c:\users\
ranjith\appdata\roaming\python\python312\site-packages (from
nbclient>=0.5.0->nbconvert->notebook-as-pdf) (8.6.2)
Requirement already satisfied: fastjsonschema in c:\users\ranjith\
anaconda3\lib\site-packages (from nbformat>=5.7->nbconvert->notebook-
as-pdf) (2.16.2)
Requirement already satisfied: jsonschema>=2.6 in c:\users\ranjith\
anaconda3\lib\site-packages (from nbformat>=5.7->nbconvert->notebook-
as-pdf) (4.19.2)
Requirement already satisfied: typing-extensions in c:\users\ranjith\
anaconda3\lib\site-packages (from pyee<12.0.0,>=11.0.0->pyppeteer-
>notebook-as-pdf) (4.11.0)
Requirement already satisfied: colorama in c:\users\ranjith\anaconda3\
lib\site-packages (from tqdm<5.0.0,>=4.42.1->pyppeteer->notebook-as-
pdf) (0.4.6)
Requirement already satisfied: soupsieve>1.2 in c:\users\ranjith\
anaconda3\lib\site-packages (from beautifulsoup4->nbconvert->notebook-
as-pdf) (2.5)
Requirement already satisfied: attrs>=22.2.0 in c:\users\ranjith\
anaconda3\lib\site-packages (from jsonschema>=2.6->nbformat>=5.7-
>nbconvert->notebook-as-pdf) (23.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in
c:\users\ranjith\anaconda3\lib\site-packages (from jsonschema>=2.6-
>nbformat>=5.7->nbconvert->notebook-as-pdf) (2023.7.1)
Requirement already satisfied: referencing>=0.28.4 in c:\users\
ranjith\anaconda3\lib\site-packages (from jsonschema>=2.6-
>nbformat>=5.7->nbconvert->notebook-as-pdf) (0.30.2)
Requirement already satisfied: rpds-py>=0.7.1 in c:\users\ranjith\
anaconda3\lib\site-packages (from jsonschema>=2.6->nbformat>=5.7-
>nbconvert->notebook-as-pdf) (0.10.6)
Requirement already satisfied: python-dateutil>=2.8.2 in c:\users\
ranjith\anaconda3\lib\site-packages (from jupyter-client>=6.1.12-
>nbclient>=0.5.0->nbconvert->notebook-as-pdf) (2.9.0.post0)
Requirement already satisfied: pyzmq>=23.0 in c:\users\ranjith\
appdata\roaming\python\python312\site-packages (from jupyter-
client>=6.1.12->nbclient>=0.5.0->nbconvert->notebook-as-pdf) (26.2.0)
Requirement already satisfied: tornado>=6.2 in c:\users\ranjith\
appdata\roaming\python\python312\site-packages (from jupyter-
client>=6.1.12->nbclient>=0.5.0->nbconvert->notebook-as-pdf) (6.4.1)
Using cached notebook_as_pdf-0.5.0-py3-none-any.whl (6.5 kB)
Downloading pypdf2-3.0.1-py3-none-any.whl (232 kB)
---------------------------------------- 0.0/232.6 kB ? eta -:--:--
- -------------------------------------- 10.2/232.6 kB ? eta
-:--:--
----- --------------------------------- 30.7/232.6 kB 262.6 kB/s
eta 0:00:01
------ -------------------------------- 41.0/232.6 kB 281.8 kB/s
eta 0:00:01
---------- ---------------------------- 61.4/232.6 kB 297.7 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
------------ -------------------------- 71.7/232.6 kB 280.5 kB/s
eta 0:00:01
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
--------------- ------------------------ 92.2/232.6 kB 83.3 kB/s
eta 0:00:02
------------------ -------------------- 112.6/232.6 kB 37.2 kB/s
eta 0:00:04
------------------ -------------------- 112.6/232.6 kB 37.2 kB/s
eta 0:00:04
-------------------- ------------------ 122.9/232.6 kB 39.8 kB/s
eta 0:00:03
-------------------- ------------------ 122.9/232.6 kB 39.8 kB/s
eta 0:00:03
-------------------- ------------------ 122.9/232.6 kB 39.8 kB/s
eta 0:00:03
-------------------- ------------------ 122.9/232.6 kB 39.8 kB/s
eta 0:00:03
------------------------ -------------- 143.4/232.6 kB 43.9 kB/s
eta 0:00:03
------------------------- ------------- 153.6/232.6 kB 46.8 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
----------------------------- --------- 174.1/232.6 kB 52.7 kB/s
eta 0:00:02
------------------------------------- - 225.3/232.6 kB 46.0 kB/s
eta 0:00:01
--------------------------------------- 232.6/232.6 kB 47.4 kB/s
eta 0:00:00
Downloading pyppeteer-2.0.0-py3-none-any.whl (82 kB)
---------------------------------------- 0.0/82.9 kB ? eta -:--:--
---------------------------------------- 0.0/82.9 kB ? eta -:--:--
---------------------------------------- 0.0/82.9 kB ? eta -:--:--
---------------------------------------- 0.0/82.9 kB ? eta -:--:--
---------------------------------------- 0.0/82.9 kB ? eta -:--:--
---------------------------------------- 0.0/82.9 kB ? eta -:--:--
---- ----------------------------------- 10.2/82.9 kB ? eta -:--:--
---- ----------------------------------- 10.2/82.9 kB ? eta -:--:--
---- ----------------------------------- 10.2/82.9 kB ? eta -:--:--
-------------- ------------------------- 30.7/82.9 kB 131.3 kB/s
eta 0:00:01
-------------- ------------------------- 30.7/82.9 kB 131.3 kB/s
eta 0:00:01
-------------- ------------------------- 30.7/82.9 kB 131.3 kB/s
eta 0:00:01
------------------- -------------------- 41.0/82.9 kB 122.9 kB/s
eta 0:00:01
------------------- -------------------- 41.0/82.9 kB 122.9 kB/s
eta 0:00:01
----------------------------- ---------- 61.4/82.9 kB 136.5 kB/s
eta 0:00:01
----------------------------- ---------- 61.4/82.9 kB 136.5 kB/s
eta 0:00:01
---------------------------------------- 82.9/82.9 kB 160.4 kB/s
eta 0:00:00
Downloading pyee-11.1.1-py3-none-any.whl (15 kB)
Downloading urllib3-1.26.20-py2.py3-none-any.whl (144 kB)
---------------------------------------- 0.0/144.2 kB ? eta -:--:--
---------------------------------------- 0.0/144.2 kB ? eta -:--:--
-- ------------------------------------- 10.2/144.2 kB ? eta
-:--:--
-- ------------------------------------- 10.2/144.2 kB ? eta
-:--:--
-- ------------------------------------- 10.2/144.2 kB ? eta
-:--:--
-- ------------------------------------- 10.2/144.2 kB ? eta
-:--:--
-- ------------------------------------- 10.2/144.2 kB ? eta
-:--:--
-------- ------------------------------- 30.7/144.2 kB 93.5 kB/s
eta 0:00:02
-------- ------------------------------- 30.7/144.2 kB 93.5 kB/s
eta 0:00:02
-------- ------------------------------- 30.7/144.2 kB 93.5 kB/s
eta 0:00:02
---------------- ---------------------- 61.4/144.2 kB 136.5 kB/s
eta 0:00:01
---------------- ---------------------- 61.4/144.2 kB 136.5 kB/s
eta 0:00:01
---------------- ---------------------- 61.4/144.2 kB 136.5 kB/s
eta 0:00:01
------------------- ------------------- 71.7/144.2 kB 115.7 kB/s
eta 0:00:01
-------------------------- ----------- 102.4/144.2 kB 159.4 kB/s
eta 0:00:01
-------------------------- ----------- 102.4/144.2 kB 159.4 kB/s
eta 0:00:01
-------------------------- ----------- 102.4/144.2 kB 159.4 kB/s
eta 0:00:01
-------------------------- ----------- 102.4/144.2 kB 159.4 kB/s
eta 0:00:01
-------------------------- ----------- 102.4/144.2 kB 159.4 kB/s
eta 0:00:01
-------------------------- ----------- 102.4/144.2 kB 159.4 kB/s
eta 0:00:01
-------------------------- ----------- 102.4/144.2 kB 159.4 kB/s
eta 0:00:01
-------------------------- ----------- 102.4/144.2 kB 159.4 kB/s
eta 0:00:01
-------------------------- ----------- 102.4/144.2 kB 159.4 kB/s
eta 0:00:01
-------------------------- ----------- 102.4/144.2 kB 159.4 kB/s
eta 0:00:01
--------------------------------- ----- 122.9/144.2 kB 91.3 kB/s
eta 0:00:01
--------------------------------- ----- 122.9/144.2 kB 91.3 kB/s
eta 0:00:01
--------------------------------- ----- 122.9/144.2 kB 91.3 kB/s
eta 0:00:01
--------------------------------- ----- 122.9/144.2 kB 91.3 kB/s
eta 0:00:01
--------------------------------- ----- 122.9/144.2 kB 91.3 kB/s
eta 0:00:01
--------------------------------- ----- 122.9/144.2 kB 91.3 kB/s
eta 0:00:01
--------------------------------- ----- 122.9/144.2 kB 91.3 kB/s
eta 0:00:01
--------------------------------- ----- 122.9/144.2 kB 91.3 kB/s
eta 0:00:01
--------------------------------- ----- 122.9/144.2 kB 91.3 kB/s
eta 0:00:01
--------------------------------- ----- 122.9/144.2 kB 91.3 kB/s
eta 0:00:01
--------------------------------- ----- 122.9/144.2 kB 91.3 kB/s
eta 0:00:01
--------------------------------- ----- 122.9/144.2 kB 91.3 kB/s
eta 0:00:01
--------------------------------------- 144.2/144.2 kB 73.3 kB/s
eta 0:00:00
Building wheels for collected packages: websockets
Building wheel for websockets (setup.py): started
Building wheel for websockets (setup.py): finished with status
'done'
Created wheel for websockets: filename=websockets-10.4-cp312-cp312-
win_amd64.whl size=95035
sha256=3c96bd8c4575fb693c3ce5195c3bc1d0a909db0e19db1dc8a9ac7bae4e5996d
d
Stored in directory: c:\users\ranjith\appdata\local\pip\cache\
wheels\80\cf\6d\5d7e4c920cb41925a178b2d2621889c520d648bab487b1d7fd
Successfully built websockets
Installing collected packages: websockets, urllib3, PyPDF2, pyee,
pyppeteer, notebook-as-pdf
Attempting uninstall: urllib3
Found existing installation: urllib3 2.2.2
Uninstalling urllib3-2.2.2:
Successfully uninstalled urllib3-2.2.2
Successfully installed PyPDF2-3.0.1 notebook-as-pdf-0.5.0 pyee-11.1.1
pyppeteer-2.0.0 urllib3-1.26.20 websockets-10.4