Python Virtual Training For Arcesium - Module II

Oct 11-15, 2021 Vikrant Patil

These notes are available online at https://notes.pipal.in/2021/arcesium_finop_batch2/

© Pipal Academy LLP

Day 1 | Day 2 | Day 3 | Day 4

We will be using jupyter hub from https://lab2.pipal.in for this training.

create a notebook with name module2-day4

Q. What is difference between repr and str

Example

Lets make a class called Timer. you can start timer, then execute some code and then stop timer. Then you can ask this timer, how much time was taken between start of a timer and stoping the timer.

timer = Timer()
timer.start()
s = 0
for i in range(10000):
    for j in range(10000):
        s += i*j + 1.1

timer.stop()
print(timer.get_ealapsed_time())

Dictionary

Example - word count

steps

find freq of every word from given text file

find freq if every word from a list of words

Usefull patterns from dictionary