python

Python Data Types

  • What are data types in Python?
  • What are Numeric Data Types?
  • I. Integers (int)
  • II. Floating-Point Numbers (float)
  • What is a String Data Type?
  • What is a Boolean Data Type?
  • Sequence Data Types
  • I. Lists
  • II. Tuples
  • III. Range
python

Python Numbers

  • What are Python numbers?
  • I. Integers
  • II. Floating-Point Numbers
  • III. Complex Numbers
  • Underscores in Numbers
  • Python Random Numbers
  • How do you write 10 3 in Python?
python

Python Boolean

  • What is a Boolean in Python?
  • How do you create a Boolean in Python?
  • Performing Boolean Operations
  • Logical AND (and)
  • Logical OR (or)
  • Logical NOT (not)
  • Making Decisions with Conditional Statements
  • Comparing Values with Comparison Operators
  • Equal to ==
python

Python List count() Method

  • Python List count() Syntax and Parameters
  • Purpose and Functionality of count() Method
  • Exploring the Return Value of the count() Method
  • Counting Occurrences of an Element in a List
  • Counting Multiple Occurrences of Elements in a List
  • Counting Occurrences of All Elements in a List
  • Utilizing the count() Method with Sublists
  • Handling Different Data Types with the count() Method
  • Using the count() Method with Custom Objects
python

Python Sorting List – Sort() Method

  • Python sort() Syntax and Parameters
  • Purpose and Functionality of Python sort() Method
  • Python Sorting a List in Ascending Order
  • Python Sorting a List in Descending Order
  • Python Sorting Lists with Key Functions
  • Python Sorting Lists with Custom Sorting Functions
  • Python Sorting Lists of Different Data Types
  • Reversing a Sorted List
  • Modifying the Original List vs. Creating a Sorted Copy
  • Handling None and Non-Comparable Elements in Lists
python

Python List reverse() Method

  • Python List reverse() Syntax and Parameters
  • Purpose and Functionality of reverse() Method
  • Reversing a List in Place
  • Accessing Elements in Reversed Order
  • How do you reverse a list in Python without the reverse() function?
  • Modifying the Original List vs. Creating a Reversed Copy
  • Modifying the Original List
  • Creating a Reversed Copy
  • Reversing Sublists within a List
  • Reversing Lists of Different Data Types
python

Python set add() Method

  • What is the Purpose of Python set add()?
  • Python set add() Syntax and Parameters
  • How does set add work in Python?
  • I. Adding a Single Element to a Set
  • II. Adding Numbers to a Set
  • III. Adding Strings to a Set
  • IV. Adding Mixed Data Types to a Set
  • V. Adding Variables to a Set
  • VI. Adding Constants to a Set
  • VII. Adding Elements in a Loop
python

Python set copy() Method

  • What is the Purpose of Set copy() Method?
  • Python set copy() Syntax and Parameters
  • How does set copy works in Python?
  • I. Creating a Copy of a Set
  • II. Modifying the Original Set after Copying
  • III. Copying a Set to Another Set
  • IV. Modifying the Copied Set without Affecting the Original
  • V. Copying a Set with Mixed Data Types
  • VI. Assigning a Copied Set to a New Variable
  • VII. Copying a Set with Nested Elements
python

Python set clear() Method

  • What is the Purpose of the clear() Method?
  • Python set clear() Syntax and Parameters
  • I. Clearing a Set: Removing All Elements
  • II. Modifying the Set after Clearing
  • III. Clearing an Empty Set
  • IV. Clearing Sets with Mixed Data Types
  • Common Mistakes and Pitfalls to Avoid
  • I. Forgetting to call the clear() method
  • II. Reassigning the set without clearing it
  • III. Confusing clear() with remove() or discard()
python

Python set difference() Method

  • What is the Purpose of the difference() Method?
  • Python set difference() Syntax and Parameters
  • How does difference() work?
  • I. Computing the Difference Between Sets
  • II. Finding the Difference Between Two Sets
  • III. Finding the Difference Between Multiple Sets
  • IV. Modifying Original Sets after Calculating the Difference
  • V. Handling Sets with Different Data Types
  • VI. Handling Empty Sets in difference()
  • VII. Using difference() with FrozenSets
python

Python Set difference_update() Method

  • What is the Purpose of the difference_update()?
  • Python Set difference_update() Syntax and Parameters
  • Python Set difference_update() Examples
  • I. Updating Original Set with difference_update()
  • II. Updating a Set with the Difference of Two Sets
  • III. Updating a Set with the Difference of Multiple Sets
  • IV. Difference Update with Empty Sets
  • V. Handling Sets with Different Data Types
  • VI. Performing Difference Update with FrozenSets
  • Common Mistakes and Pitfalls to Avoid
python

Python set discard() Method

  • What is the Purpose of the discard() Method?
  • Python set discard() Syntax and Parameters
  • I. Removing an Element from a Set
  • II. Modifying the Set after Discarding an Element
  • III. Handling Multiple Occurrences of an Element
  • IV. Discarding Non-existing Elements
  • V. Discarding Elements with Different Data Types
  • VI. Discarding Elements in a Loop
  • Common Mistakes and Pitfalls to Avoid
  • I. Forgetting to Check if an Element Exists
python

Python Set Intersection() Method

  • What is the Purpose of Python Set intersection()?
  • Python set intersection() Syntax and Parameters
  • How do you find the intersection in Python?
  • I. Finding the Intersection of Two Sets
  • II. Finding the Intersection of Multiple Sets
  • III. Modifying the Original Sets after Calculating the Intersection
  • IV. Handling Empty Sets in intersection()
  • V. Handling Sets with Different Data Types
  • VI. Intersection with FrozenSets
  • Common Mistakes and Pitfalls to Avoid
python

Python set intersection_update() Method

  • What is the Purpose of Python set intersection_update()?
  • Python set intersection_update() Syntax and Parameters
  • I. Updating Original Set with intersection_update()
  • II. Updating a Set with the Intersection of Two Sets
  • III. Updating a Set with the Intersection of Multiple Sets
  • IV. Handling Sets with Different Data Types
  • V. Performing Intersection Update with FrozenSets
  • Common Mistakes and Pitfalls to Avoid
  • I. Incorrect Method Usage
  • II. Not Converting Data Types
python

Python Set isdisjoint() Method

  • What is Python set isdisjoint()?
  • What is the Purpose of the isdisjoint()?
  • Python set isdisjoint() Syntax and Parameters
  • How to Check for Disjointness Between Sets?
  • I. Checking if Two Sets are Disjoint
  • II. Checking if a Set is Disjoint with Multiple Sets
  • III. Python Set isdisjoint() with Different Data Types
  • Common Mistakes and Pitfalls to Avoid
  • I. Incorrect Method Usage
  • II. Incorrect Handling of Data Types
python

Python issubset() Method

  • What is the Purpose of Python issubset()?
  • Python issubset() Syntax and Parameters
  • Checking for Subset Relationships in Python
  • I. Checking if Set is a Subset of Another Set
  • II. Checking for Multiple Subsets
  • III. Handling Different Data Types in Subset
  • Common Mistakes and Pitfalls to Avoid
  • I. Incorrect Method Usage
  • II. Misunderstanding the Return Value
  • III. Neglecting Empty Sets
python

Python issuperset() Method

  • What is the Purpose of Python issuperset() Method?
  • Python issuperset() Syntax and Parameters
  • I. Checking if One Set is a Superset of Another Set
  • II. Checking for Multiple Supersets
  • III. Using Superset Operators
  • IV. Using Superset with Different Data Types
  • Common Mistakes and Pitfalls to Avoid
  • I. Incorrect Method Usage
  • II. Misunderstanding the Return Value
  • III. Neglecting Empty Sets
python

Python Set symmetric_difference() Method

  • What is the Purpose of Python set symmetric_difference()?
  • Python symmetric_difference() Syntax and Parameters
  • I. Finding the Symmetric Difference between Two Sets
  • II. Using the symmetric_difference() Method on Multiple Sets
  • III. Handling Sets with Different Data Types
  • IV. Symmetric Difference Using Operators
  • Common Mistakes and Pitfalls to Avoid
  • I. Mixing Data Types
  • II. Incorrect Syntax
  • III. Missing Sets
python

Python Set symmetric_difference_update() Method

  • What is the Purpose of Python set symmetric_difference_update()?
  • Syntax and Parameters
  • I. Updating a Set with the Symmetric Difference of Two Sets
  • II. Handling Sets with Different Data Types
  • Common Mistakes and Pitfalls to Avoid
  • I. Difference between symmetric_difference_update() and symmetric_difference()
  • II. Passing the wrong set as a parameter
  • III. Forgetting to store the updated set
  • IV. Mixing up the order of operations
  • V. Not considering the data types in the sets
python

Python Set union() Method

  • What is the Purpose of Python Set union() Method?
  • Python Set union() Syntax and Parameters
  • How do you use a union in a set?
  • I. Using the union() Method on Sets
  • II. Combining Multiple Sets with Union()
  • III. Combining Multiple Sets with For Loop
  • IV. U-sing the "|" Operator for Set Union()
  • V. Handling Union() with Different Data Types
  • Common Mistakes and Pitfalls to Avoid
  • I. Incorrect Syntax
python

Python Dictionary items() Method

  • Python Dictionary items() Syntax and Parameters
  • What does items() and keys() do in dictionary?
  • I. Retrieving Key-Value Pairs with the items() Method
  • II. Iterating Over Key-Value Pairs Using the items() Method
  • III. Accessing Dictionary Values through items()
  • IV. Modifying Dictionary Values through items()
  • V. Converting Dictionary items() to Other Data Types
  • VI. Filtering and Manipulating Dictionary items()
  • VII. Sorting Key-Value Pairs in Ascending Order
  • VIII. Sorting Key-Value Pairs in Descending Order
python

Python Functions

  • Python Function Syntax and Structure
  • I. Defining a Function
  • II. Calling a Function
  • III. Function Arguments and Return Values
  • IV. Scope and Variable Visibility
  • Function Types In Python
  • I. Built-in Functions
  • II. User-defined Functions
  • III. Lambda Functions
  • IV. Recursive Functions
python

Python dict() Function

  • Python dict() Syntax and Parameters
  • I. Keyword Arguments (kwargs)
  • II. Mapping Object
  • III. Iterable
  • Python dict() Return Value
  • What Does dict() Function Do?
  • I. Creation of dict() Object
  • II. Deep-Copying Dictionaries with dict()
  • III. Using zip() with dict()
  • Handling Different Data Types with dict()
python

Python divmod() Function

  • Python divmod() Syntax and Parameters
  • Python divmod() Return Value
  • What Does divmod() Function Do?
  • I. Python divmod() with Integer Arguments
  • II. Python divmod() with Float Arguments
  • III. Python divmod() with Negative Numbers
  • IV. Python divmod() with Non-Numeric Arguments
  • V. Python divmod() with Complex Number Arguments
  • VI. Python divmod() with Conditional Statements
  • Python divmod() with Non-Primitive Datatype
python

Python enumerate() Function

  • What is a the Purpose of enumerate() ?
  • Python enumerate() Syntax and Parameters
  • I. Iterable
  • II. Start (optional)
  • Python enumerate() Return Value
  • What Does enumerate() do in Python?
  • I. Creating a enumerate() Object
  • II. Enumerate() Start Position: 0 or 1
  • III. Adding Counter to Iterable with enumerate()
  • Python enumerate() with Non-Primitive Datatype
python

Python eval() Function

  • Python eval() Syntax and Parameters
  • I. Expression
  • II. Globals (optional)
  • III. Locals (optional)
  • Python eval() Return Value
  • What Does eval() Function Do?
  • I. Creating an eval() Object
  • II. Evaluating Expressions using eval()
  • III. Boolean Expressions using eval()
  • IV. Checking Conditions using eval()
python

Python float() Function

  • Python float() Syntax and Parameter
  • Python float() Return Value
  • What does float() do in Python?
  • I. Creating float() Object
  • II. Converting Integer into Float
  • II. Converting String into Float
  • III. Python float() with Invalid Input
  • IV. Python float() with Infinity and NaN
  • V. Python float() with Precision and Rounding
  • Python float() Advanced Examples
python

Python format() Function

  • Python format() Syntax and Parameters
  • Python format() Return Value
  • What Does format() Function Do?
  • I. Creating an Object through format() function
  • II. Python String format() and Value Formatting
  • III. Python Single String format()
  • IV. Python format() - Index-Based Replacement
  • V. Python String format() IndexError
  • VI. Python format() and Escape Sequences
  • VII. Python format() with Positional and Keyword Arguments
python

Python input() Function

  • What is a Purpose of input() Function?
  • Python input() Syntax and Parameter
  • Python input() Return Value
  • I. Creation of input() Object
  • II. Python input() with Integers
  • III. Python input() with Float
  • IV. Python input() with Conditional Statements
  • Python input() Advanced Examples
  • I. Python input() with Lists
  • II. Python input() with Dictionaries
python

Python int() Function

  • Python int() Syntax and Parameter
  • Python int() Return Value
  • I. Creation of int() Object
  • II. Python int() Size
  • III. Python int() with Two Arguments
  • IV. Python int() with Float
  • V. Handling Invalid Input for int()
  • Python int() Advanced Examples
  • I. Invalid Literal for int() with Base 10
  • II. Arithmetic and Mathematical Calculations with int()
python

Python isinstance() Function

  • Python isinstance() Syntax and Parameters
  • I. Object
  • II. Type
  • Python isinstance() Return Value
  • I. Creation of isinstance() Object
  • II. Python isinstance() with Float
  • III. Using isinstance() for Type Checking and Validation
  • IV. Python isinstance() with User-Defined Classes
  • V. Python isinstance() Time Complexity
  • Python isinstance() Advanced Examples
python

Python OOP Concepts

  • I. Python Class
  • II. Python Objects
  • Python OOP Advanced Examples
  • I. Python Inheritance
  • II. Python Polymorphism
  • III. Python Encapsulation
  • Advantages of Python OOP Concepts
  • I. Modularity
  • II. Reusability
  • III. Ease of Maintenance
python

Python Classes and Objects

  • Syntax of Class Declaration
  • Syntax of Object Declaration
  • I. Create a simple class
  • II. Create a simple Object
  • III. Retrieving Attributes Using Class and Object
  • Terms Used with Class and Object
  • I. Pass Statement
  • II. __init__() method
  • III. __str__() method
  • Class and Object Advanced examples
python

Python String Methods

  • List of Python String Methods
Scroll to Top