0% found this document useful (0 votes)
25 views

Python Fresher

Python Notes for a fresher

Uploaded by

hariom_jadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Python Fresher

Python Notes for a fresher

Uploaded by

hariom_jadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1) DataTypes:

a) Strings
slicing/len/concatenation/
b) Numbers
c) List
extend, append, slicing, join(), len(), zip()
d) Tuple
Define a tuple, operations
e) Dictionary
initialization/get/set/keys()/values()/items()/use tuple as a key, nested
dict

2) if/else/elif:
Study if else and elif

3) Loops:
For loop, while loop, range(), set, break, continue
list comprehension, list comprehension with conditions, dict comprehension

4) Functions:
normal function/ return type/ recursive function
wap for prime number, recursion for fibonacci

Miscellaneous:
- understand pip install
- study PEP8
- https://www.youtube.com/watch?v=Hwckt4J96dI
- https://www.python.org/dev/peps/pep-0008/

Programs to confirm the understanding of above topics


- Find length of string in python
- Reverse words in a given String in Python
- Remove spaces from string

Programs to confirm the understanding of above topics


- generate square of first 10 natural numbers / do the same using list comprehension
- generate square of first 10 odd numbers using list comprehension
- list numbers till 100, divisible by 5 and 3 using list comprehension
- extract unique values from dictionary
- change value to key to value in a dictionary
- generate a dictionary from the given string: “k1, v1, k2, v2, k3, v3, k4, v4…..”,
output dict will be: {“k1”: v1, “k2”: v2, “k3”: v3, , , , }
- solve frequency count problem, given string: “hello world!”, output dict: {“h”: 1,
“e”: 1, “l”: 3, “o”:2, , , ,}

5) Modules in python
Import a module, understand the packages, __init__.py

6) DateTime module
Find today date/ date formats, strftime / strToDate, strptime
Find date diff/ total days between 2 days/ today + 3 days later date

7) File I/O operations


Read into file / write into file / delete a file

8) Exception handling
Try catch with basic exception / print error stack

9) DBaccess
Setup workbench and perform mysql connection using python

10) sending/reading of email


review the ready script to send mail, read data/file from mail

SQL/Database:
- Basic mysql queries, with workbench mysql setup
- Python script to insert/fetch/update/delete record from sql table

Projects:
- Django projects
- A basic projects with 2-3 models
- Models which are having ForeignKey / ManyToMany mappings
- Migrations / Admin view
- Template rendering / template tags
- default with sqlitedb then try to migrate the same in mysql
- DRFin django
Create a url router, viewset & serializer with

- Web Scraping project


A basic project which scraps some content from a site and generate a csv
Say site is https://cslide.ctimeetingtech.com/siop21/attendee/confcal/session/
list/ and content we need to generate in csv like

Tools:
- Git
- basic git commands like
- git status / add / commit / reset / push / pull / fetch

You might also like