About 6,970,000 results
Open links in new tab
  1. mysql - Convert sql result to list python - Stack Overflow

    Feb 12, 2013 · If you have an iterable in Python, to make a list, one can simply call the list() built-in: list(cursor.fetchall()) Note that an iterable is often just as useful as a list, and potentially …

  2. Creating a list of objects in Python - Stack Overflow

    I'm trying to create a Python script that opens several databases and compares their contents. In the process of creating that script, I've run into a problem in creating a list whose contents are …

  3. How to create a list of object in Python class - GeeksforGeeks

    Apr 15, 2025 · In Python, creating a list of objects involves storing instances of a class in a list, which allows for easy access, modification and iteration. For example , with a Geeks class …

  4. Object Relational Mapping: From Python to SQL and Back

    Jan 23, 2024 · ORM stands for ‘object relational mapping’, which basically the process of taking data from a Python object [aka class instance] and converting it into a table row format to be …

  5. Convert SQL Result to List in Python (Example) | SQLite Database

    Next, we will create a cursor object: The cursor object is what will enable us to execute SQL queries. Having created the cursor object, we will now execute a statement that will enable us …

  6. Convert Generator Object To List in Python - GeeksforGeeks

    Feb 6, 2024 · In this article, we'll explore the methods behind converting generator objects to lists and how to perform this transformation in Python. Below, are the ways to Convert Generator …

  7. Working with Lists of Objects in Python - CodeRivers

    Mar 18, 2025 · To create a list of objects, we first create multiple objects of the same class and then add them to a list. def __init__(self, name, age): self.name = name. self.age = age. In this …

  8. Making queries | Django documentation

    To represent database-table data in Python objects, Django uses an intuitive system: A model class represents a database table, and an instance of that class represents a particular record …

  9. 4 different ways in Python to create a list of objects

    Apr 23, 2023 · This post will show you 4 different ways to create a list of objects in Python. We will learn how to use append, extend and insert methods to create a list of Python objects.

  10. # Using Python lists as a database - tecladocode

    Jan 1, 2020 · Let's get started by creating a Python file to contain the logic that interacts with the data store. For now the data store is a list, but later on it'll be a database. I'll call this new file …

  11. Some results have been removed
Refresh