Welcome to DataDrift with Us! This repository documents our journey through learning Python from the basics. Below is a summary of what we’ve covered so far.
- Introduction to Python
- Using Google Colab
- GitHub Basics
- Python Syntax
- Comments (Single-line and Multi-line)
- Variables
- Data Types
- F-Strings
- Taking Input using
input() - Display Output with
print() - Checking Data Types using
type() - Typecasting: Converting between
str,int, andfloat - Operators:
+,-,*,/,%,// - Conditional Statements:
if,else,elif - Logical Operators:
and,or,not
- String Indexing and Slicing
- Slice Syntax:
[start:end:step] forLoopswhileLoops- Loop Control Statements:
break– exit the loopcontinue– skip to the next iterationpass– do nothing (placeholder)
- Definition of a Function
- Function Syntax
- Calling a Function
- Function Parameters / Arguments
- Return Statement
- Scope and Lifetime of Variables
- Local and Global Variables
- User-defined Functions
- Default Arguments
- Keyword Arguments
- Variable-length Arguments:
*argsand**kwargs
- Creating and using multiple functions
- Lists and dictionaries to manage data
- Building a simple console-based menu
- User interaction through loops and input
- Practicing modular and reusable code
- Introduction to Lists and Tuples
- List Syntax and Examples
- Accessing, Modifying, and Deleting Elements
- Common List Methods:
append(),insert(),extend(),remove(),pop(),sort(),reverse(),copy() - Looping through Lists
- List Comprehensions
- Tuple Syntax and Examples
- Tuple Immutability
- Tuple Methods:
count(),index() - List ↔ Tuple Conversion
- List vs Tuple Comparison
- Intermediate Techniques: Slicing, Unpacking, Nested Lists
- Practice Exercises
- Introduction to Sets
- Set Syntax: Creating sets with
{}orset() - Properties of Sets:
- Unordered
- No duplicate elements
- Mutable
- Adding Elements:
add()andupdate() - Removing Elements:
remove(),discard(), andpop() - Set Operations:
- Union (
|or.union()) - Intersection (
&or.intersection()) - Difference (
-or.difference()) - Symmetric Difference (
^or.symmetric_difference())
- Union (
- Membership Testing:
in,not in - Iterating through Sets using
forloop - Set Comprehensions
- Frozen Sets and their immutability
- Real-world Examples and Exercises
- Introduction to Dictionaries
- Key-Value Pair Structure
- Dictionary Syntax:
- Using
{} - Using
dict()constructor
- Using
- Properties of Dictionaries:
- Ordered (as of Python 3.7+)
- Mutable (changeable after creation)
- Keys must be unique
- Accessing Values using
[]andget() - Modifying Values and Adding New Pairs
- Removing Elements:
pop(),popitem(),clear() - Dictionary Methods:
get(),keys(),values(),items()setdefault(),update(),copy()fromkeys()
- Iterating through Dictionaries using
forloops - Real-life Examples and Exercises
- Functions as first-class citizens
- Passing functions as arguments
- Creating and applying custom decorators
- Logging function calls using
@decoratorsyntax
- Introduction to Classes and Objects
- Attributes and Methods
- Creating and instantiating classes
- Constructors using
__init__() - Simple examples like
House,Car,Dogclasses - Modeling real-world entities with OOP principles