Python Programming

Python Introduction Essentials for Beginners: Part 2 — Variables, Data Types and Loops

Kickstart your Python journey with Part 2 of our beginner's guide. We cover variables, data types, user input, loops and conditional logic — with practical examples you can try right away. ABC Trainings delivers hands-on Python training in Pune (Wagholi, Hadapsar), Sambhajinagar and Sangli.

AB
ABC Trainings Team
June 15, 2026 — 8 min read

Python Introduction Essentials for Beginners: Part 2 — Variables, Data Types and Loops (Updated June 2026)

Here's the thing about learning Python — the first episode gets you installed and "hello world" running, but Part 2 is where things actually click. NASSCOM and Deloitte jointly project that India needs 1.25 million AI and data professionals by 2027, and nearly every one of those roles lists Python as a core requirement. Whether you're targeting a data analyst position at Infosys Pune, a backend role at TCS, or building automation tools for your own venture, the concepts in this episode — variables, data types, user input and loops — are the building blocks you will use every single day. This guide walks through each concept exactly the way we teach it in our live Python batches at ABC Trainings, so you can follow along whether you're a student, a working professional switching careers, or just curious about what all the Python fuss is about.

TL;DR
  • Python variables store data: learn naming rules, assignment and reassignment
  • Core data types: int, float, str, bool, list — what each one does and when to use it
  • input() and int() let you build interactive programs from day one
  • for and while loops cut repetitive code — master range(), enumerate() basics
  • if/elif/else conditionals make your programs smart and responsive
  • Python freshers in Pune earn Rs 3.5–6 LPA; mid-level roles at TCS, Infosys reach Rs 10–18 LPA

What Are Python Variables? A Beginner's Honest Explanation

A variable in Python is simply a name you give to a value so you can use it later. That's it. You don't have to declare a type, you don't need a semicolon, and you don't have to shout at the compiler. Write name = "Arjun" and Python just stores the string. Write age = 22 and it stores the integer. What most people don't realize is that Python variables are actually references to objects in memory — this matters later when you start passing lists into functions. For now, remember three rules: variable names can contain letters, digits and underscores; they cannot start with a digit; and Python is case-sensitive (Name and name are different variables). Practical exercise from our batch: write a short program that stores your name, course and city in three variables and prints a formatted sentence. Students who do this exercise remember variables for life.

Python Introduction Essentials for Beginners: Part 2 — Variables, Data Types and Loops
Real student workshop at ABC Trainings

Python Data Types: int, float, str, bool and list

Python has five data types you will use constantly as a beginner. int (integer) handles whole numbers like 25, 100, -7. float handles decimals like 3.14, 9.81 — important in engineering calculations. str (string) holds text: "Pune", "hello", "ABC Trainings". bool is just True or False — used heavily in conditions. list is a collection of values: ["Python", "Django", "Flask"]. Two things to know immediately: first, you can check a variable's type with type(my_var) — print it to confirm. Second, Python is dynamically typed, which means the same variable can hold a string one line and an integer the next. This trips up beginners who come from Java or C++. The good news is that most bugs from this are caught quickly because Python throws a clear TypeError when you try to add a string to a number without converting first.

Python Core Data Types — Quick Reference
Data TypeExampleUse CaseConvert With
intage = 22Counting, indexing, scoresint()
floatgpa = 8.7Measurements, calculationsfloat()
strcity = "Pune"Names, messages, labelsstr()
boolis_enrolled = TrueFlags, conditions, switchesbool()
listskills = ["Python","SQL"]Collections, datasetslist()

Getting User Input and Writing Interactive Programs

The input() function reads whatever the user types and returns it as a string. This single function unlocks a massive range of projects for beginners: calculators, quiz apps, data collectors. Trust me, the moment you build a program that responds to what you type, Python stops feeling abstract. The catch: input() always returns a string, even when the user types 22. So if you want arithmetic, convert it: age = int(input("Enter your age: ")). For decimal input, use float(). A common pattern in our workshops is building a simple unit converter — the student types a value in kilometres and the program prints miles. Covers input(), float(), basic arithmetic, and print formatting in one exercise. You can also use f-strings for output: print(f"You are {age} years old") — cleaner than concatenation every time.

Python Introduction Essentials for Beginners: Part 2 — Variables, Data Types and Loops
Real student workshop at ABC Trainings

Python Loops: for, while and the range() Function

Loops solve the problem of repetition. Without them you would have to write the same code fifty times to process fifty student records. Python has two loops: for and while. Use for when you know how many times you want to iterate — over a list, a string, or a range of numbers. range(1, 6) gives you 1, 2, 3, 4, 5. Use while when you want to keep going until a condition changes — like prompting a user to enter valid input. The most common beginner mistake is creating an infinite while loop by forgetting to update the condition variable inside the loop. Quick fix: every while loop should have a clear exit path. Also learn break (exit the loop immediately) and continue (skip the current iteration and move to the next) — they give you precise control once your programs get more complex.

Conditional Logic: if, elif and else in the Real World

Conditional statements give your code the ability to make decisions. if checks a condition; elif (else if) checks another condition if the first was False; else handles everything that didn't match. The golden rule: always think about your conditions as yes/no questions. Is age >= 18? Is score > 90? Did the user type "exit"? Python evaluates these using comparison operators (==, !=, >, <, >=, <=) and logical operators (and, or, not). What most people miss early on: == checks equality, = assigns a value. Confusing the two is a classic bug. In our Pune and Sambhajinagar batches we use a grade calculator as the first conditional exercise — input a score, output "Distinction", "First Class", "Pass" or "Fail". It forces students to think through every possible case before they write a single line of code. That thinking skill transfers directly to writing production-grade logic later.

Python Jobs in Pune, Sambhajinagar and Sangli — What the Market Actually Pays

The job market for Python developers in Maharashtra is strong — and getting stronger as AI adoption forces every company to upskill. Freshers with solid Python fundamentals are landing roles between Rs 3.5 LPA and Rs 6 LPA (PayScale, AmbitionBox 2025 data). With one to two years of experience and a specialisation — data analysis, Django web development, automation scripting — salaries jump to Rs 8–14 LPA. Senior Python engineers at Infosys Pune, KPIT Technologies (Hinjewadi), and Persistent Systems (Pune) command Rs 18–28 LPA. In Sambhajinagar, the IT sector is growing with companies like Skoda Auto Volkswagen India (Plant A-1/1, Shendra MIDC) and Bajaj Auto (Waluj, Plot G-137) actively onboarding technical teams that use Python for automation. Sangli students placed through ABC Trainings have joined the IT park at Kupwad MIDC and firms connected with the SMMMA industrial belt. Walchand College alumni average Rs 10.55 LPA — evidence that strong technical training in Sangli translates to real earnings. Call 7039169629 to check upcoming Python batch dates.

Maharashtra Government Scheme: The Chief Minister Yuva Karmasathi Protsahan Yojana (CMYKPY) provides eligible unemployed youth a stipend of Rs 6,000–Rs 10,000 during skill training. PMKVY 4.0 has trained 2.1 crore youth nationally. Ask our counsellors whether your Python course qualifies — call 7039169629 or WhatsApp 7774002496.

Get the IT Training Brochure + Fees + Batch Dates on WhatsApp

Free 1:1 counselling. Placement track record. CMYKPY/PMKVY eligibility check.

💬 Get Brochure on WhatsApp📞 Call 7039169629

About the author: Amit Kulkarni. 8 yrs leading IT training at ABC Trainings, ex-Infosys.

Visit Our Centers

  • Wagholi (Pune): 1st Floor, Laxmi Datta Arcade, Pune-Ahilyanagar Highway. Call 7039169629
  • Hadapsar (Pune HQ): 1st Floor, Shree Tower, opp. Vaibhav Theater, Magarpatta. Call 7039169629
  • Cidco (Chh. Sambhajinagar): Kalpana Plaza, opp. Eiffel Tower, N-1 Cidco. Call 7039169629
  • Osmanpura (Chh. Sambhajinagar): S.S.C Board to Peer Bazar Road, near Jama Masjid. Call 7039169629
  • Sangli: Shubham Emphoria, 1st Floor, Above US Polo Assn., Sangli-Miraj Rd, Vishrambag. Weekend batches available. Call 7039169629

💬 WhatsApp 7774002496

FAQs

What topics are covered in Python Introduction Part 2?

Part 2 covers Python variables, all core data types (int, float, str, bool, list), the input() function and type conversion, for loops, while loops, range(), and if/elif/else conditional logic. Each concept is taught with practical exercises that build on each other.

Which Python IDE is best for absolute beginners?

VS Code with the Python extension is our top recommendation for beginners — it is free, fast and industry-standard. Jupyter Notebook is excellent if you want to see output cell by cell (great for data work). PyCharm Community Edition is feature-rich for larger projects. Google Colab requires zero setup and runs in a browser — ideal if you just want to start coding immediately.

How long does it take to learn Python basics?

With consistent practice of one to two hours per day, most beginners can cover the fundamentals in four to six weeks. That includes variables, data types, input/output, loops, conditionals and basic functions. Building your first small project (a calculator or quiz app) usually happens around week three. Job-ready proficiency with a specialisation like Django or data analysis takes three to six months of focused learning.

Does ABC Trainings offer Python classes in Sambhajinagar?

Yes. ABC Trainings has centres in Cidco (Kalpana Plaza, opp. Eiffel Tower, N-1) and Osmanpura (near Jama Masjid) in Chh. Sambhajinagar. We offer both weekday and weekend Python batches. Call 7039169629 or WhatsApp 7774002496 to check the next batch start date and get the fee structure.

A

ABC Trainings Team

Expert insights on engineering, design, and technology careers from India's trusted CAD & IT training institute with 11 years of experience and 2000+ trained professionals.