๐Ÿ“Š We use cookies & analytics to improve your experience. Learn more
Latest

Free course ยท Beginner

Python for Absolute Beginners

๐Ÿ› Way2Freshers Academy โฑ 6 weeks โญ 4.8 ๐Ÿ‘ฅ 12,400 learners ๐ŸŽ“ Certificate

Free 5 modules ยท 15 lessons Start now โ†’

What you will learn

  • Install Python and run a script on your own machine โ€” and in a browser when you have to borrow a computer
  • Use variables, strings, numbers, lists and dictionaries without looking up the syntax every time
  • Make a program decide and repeat with if/else and loops, instead of testing it by hand
  • Write your own functions, so a program you already wrote can be reused instead of retyped
  • Read and clean a real CSV file, then print a summary an interviewer would accept
  • Explain any line of your own code out loud โ€” the skill technical interviews actually test

Course curriculum

5 modules ยท 15 lessons ยท a worked example and a practice task in every lesson

Module 4Files and real data4 of 53 lessons

Week 4 โ€” read a file, clean it, summarise it. The week the course becomes useful beyond the classroom.

  1. Reading and writing files

    with open("data.txt") as f: reads a file and closes it for you, even if the code inside fails โ€” which is why `with` is the pattern to learn first.

    The lesson

    with open("data.txt") as f: opens a file and closes it for you, even if the code inside fails โ€” which is why with is the pattern to learn first and not a shorthand to upgrade to later. Then for line in f: walks it one line at a time, which is how large files are read without loading all of them into memory at once.

    Writing takes a mode: open("report.txt", "w") replaces the file, while "a" appends to it. That difference has wiped out more data than any other beginner line of code โ€” use "a" when you are adding today's entry to yesterday's. Each line you write ends with \n, and each line you read arrives with one, which is why line.strip() appears in almost every file loop.

    The mistake is a path that is not where you think it is. data.txt means "in the folder the program was started from", not "next to my script" โ€” use an absolute path while learning, and get in the habit of opening the file in your editor to confirm the write actually happened.

    Python
    with open("notes.txt", "a") as f:      # "a" appends; "w" would wipe the file
        print("Learned functions today", file=f)
    
    with open("notes.txt") as f:
        for line in f:
            print(line.strip())

    Example for line in f: print(line.strip()) โ€” strip() removes the newline character that would otherwise print a blank line between every row.

    Practice Write a program that writes three lines to a file and then reads them back, printing the count of lines.

  2. CSV โ€” the format every office runs on

    CSV is plain text with commas: the format of exports from Excel, Google Sheets and almost every college and office system.

    The lesson

    CSV is a plain text file where each line is a row and commas separate the fields. It is what Excel, Google Sheets, banking portals and college systems export, which is why it is the first data format worth knowing โ€” not because it is clever, but because everything ends up in it.

    import csv then csv.reader(f) gives you one list per row, so row[0] is the first column and row[2] the third. When the file has a header, csv.DictReader(f) is better: every row arrives as a dictionary keyed by the column names, so you write row["city"] instead of counting commas and hoping. Read the header row first and print it โ€” you are then certain which column is which before you write any logic.

    The mistake is assuming the file is clean: extra blank lines, extra spaces after commas, amounts written as "1,200" with a comma inside the field, and one stray semicolon instead of a comma will all break a loop. Print the first five rows before writing anything clever, and count the columns in each โ€” that five-second check is what separates someone who debugs for an hour from someone who does not.

    Python
    import csv
    
    with open("students.csv", newline="") as f:
        for row in csv.DictReader(f):
            print(row["name"], row["city"])   # keyed by the header row

    Example import csv then csv.reader(f) gives one list per row, so row[0] is the first column โ€” exactly how a marks or attendance sheet is structured.

    Practice Export any real spreadsheet to CSV, read it in Python, and print the number of rows and the column names.

  3. Cleaning mess before analysing it

    Real data has blank cells, stray spaces and inconsistent capitals. Cleaning is the first 60% of every data job, not a preliminary nobody does.

    The lesson

    Cleaning is not the boring part before the real work; it IS the work, and it is roughly the first sixty per cent of any data job. Real columns contain " asha ", "Asha", "ASHA" and an empty cell, and any calculation built on top of that will be wrong in a way that looks right.

    Three clean-ups solve most of it. Trim the spaces: value.strip(). Standardise the case: .title() for names, .lower() for emails and categories. And drop the rows that cannot be used rather than guessing: if not row["city"]: continue. Print a count of how many rows you removed and why โ€” a report that says "412 rows read, 9 skipped for a blank city" is a report a manager believes.

    The mistake is cleaning silently. Nobody can check a number they cannot see the steps behind, so write the count of rows in, rows used and rows dropped at the top of your output. That is also the first thing an interviewer asks about a data project โ€” and the first thing a fresher cannot answer.

    Python
    import csv
    
    kept, dropped = 0, 0
    with open("raw.csv", newline="") as f:
        for row in csv.DictReader(f):
            city = (row["city"] or "").strip().title()
            if not city:
                dropped += 1
                continue
            kept += 1
            print(city)
    
    print(f"kept {kept}, skipped {dropped} with a blank city")

    Example value.strip().title() turns " asha " into "Asha"; skipping rows where the key column is empty removes the junk rows a manual export always leaves.

    Practice Clean your CSV: trim spaces, skip empty rows, standardise one text column, and print how many rows you removed and why.

Show all modules on one page

About Python for Absolute Beginners

Write real Python programs โ€” read a data file, clean it and print a summary โ€” in six weeks, with no coding experience to start from.

School and college students, non-IT graduates and career switchers who have never written a line of code and want an honest first foothold in programming.

What you will be able to do at the end

  • Install Python and run a script on your own machine โ€” and in a browser when you have to borrow a computer
  • Use variables, strings, numbers, lists and dictionaries without looking up the syntax every time
  • Make a program decide and repeat with if/else and loops, instead of testing it by hand
  • Write your own functions, so a program you already wrote can be reused instead of retyped
  • Read and clean a real CSV file, then print a summary an interviewer would accept
  • Explain any line of your own code out loud โ€” the skill technical interviews actually test

How the course is structured

5 modules and 15 lessons, arranged so each one ends with something you have built. Every lesson carries a worked example and a practice task โ€” the practice is the course, the reading is only the setup. Plan for 6 weeks ยท about 6 hours a week.

The full syllabus โ€” every lesson, its example and its practice task โ€” is in the Course curriculum below. Nothing is locked and nothing needs an account.

Your weekly routine

  • Two weeknights of 90 minutes: one lesson, then its practice task written out by hand before typing it in.
  • One 3-hour weekend block: finish the module project for that week and push the code.
  • Fifteen minutes on the day after a session re-reading your own code and rewriting one function more cleanly.

What you will have built by the end

  • Expense tracker โ€” records, saves and summarises to a CSV
  • Quiz program โ€” reads questions from a file and reports an answer-wise score
  • A published GitHub repository with a README a recruiter can follow

Where this leads for a fresher

  • Support and manual-testing roles that need scripting
  • Junior Python or automation trainee
  • Data-entry-to-data-analyst transitions
  • Internships where the first task is scripting a repetitive process

Titles vary between companies; the evidence does not. A deployed project, a set of queries you can explain, or a case study with real testing behind it is what a fresher interview has to work with.

Frequently asked questions

Do I need to be good at maths?

No. Nothing in this course goes past averages and percentages. Maths matters for machine learning, which is a later, separate step โ€” treating it as a gate to programming is the single most common reason students never start.

I only have a phone. Can I still do it?

You can learn and read on a phone, but you must type the code, and typing a loop on a phone keyboard is painful. Plan for two hours a week on any shared computer โ€” a college lab, a friend's laptop or a cyber cafรฉ. Writing it yourself is the part that teaches.

Is this course free?

Yes. The lessons, examples and practice tasks are free to read and to follow. The certificate, where a course offers one, is booked separately from the course page.

How do I know if I am actually ready for a job after this?

Take the free Career Pulse check. It scores your skills, communication and goal clarity against the roles you are aiming for and returns a roadmap of exactly what to fix first. Six weeks of Python with nothing else built still scores low โ€” and knowing that before you apply is worth more than a certificate.

Not sure which of these you need first? The free Career Pulse check scores your skills, communication and goal clarity in about three minutes and tells you which gap to close first. Take the free check.