About 72,900,000 results
Open links in new tab
  1. Convert string to a list in Python - GeeksforGeeks

    May 5, 2025 · Converting a list string to a dictionary in Python involves mapping elements from the list to key-value pairs. A common approach is pairing consecutive elements, where one …

  2. python: creating list from string - Stack Overflow

    I have list of strings. a = ['word1, 23, 12','word2, 10, 19','word3, 11, 15'] I would like to create a list. b = [['word1',23,12],['word2', 10, 19],['word3', 11, 15]] Is this a easy way to do this?

  3. How to Convert String to List in Python? - Python Guides

    Apr 3, 2025 · In this tutorial, I explained different methods for converting a string to a list in Python, such as the split() method, list() function, list comprehension, re.findall(), or …

  4. 7 Powerful Ways To Convert String To List In Python

    Jan 24, 2021 · To convert a string into list of characters, we can simply use type conversion using the inbuilt list () method. Using type conversion with the help of list () method, it directly …

  5. Python String to Array – How to Convert Text to a List

    Feb 21, 2022 · To remove whitespace only from the beginning and end of the string, use the strip() method. current_routine_list = list(current_routine.strip()) print(current_routine_list) …

  6. How to Convert a String to a List in Python: Step-by-Step Guide

    Feb 25, 2025 · Converting a Python string to a list is a common operation that can be useful in many scenarios, such as data preprocessing, text analysis, and more. This tutorial aims to …

  7. How to Split a String into a List in Python - Intellipaat

    May 15, 2025 · Method 4: Using Partition() Method in Python. The partition() method takes in a separator argument and then splits the string into two parts over this separator. The method …

  8. Python: 4 Ways to Convert a String into a List - Sling Academy

    May 25, 2023 · This concise, example-based article walks you through four different ways to turn a given string into a list in Python. Life is short, and time is precious; let’s get to the point. …

  9. How to Convert a String to List in Python - Delft Stack

    Jan 24, 2025 · In this article, we will demonstrate different methods to convert a string into a list in Python. The list() function converts the string into a list in Python. Let’s take the below code as …

  10. 5 Ways to Convert String to a List in Python - Analytics Vidhya

    Apr 22, 2025 · One popular method for converting a string to a list in Python is using the list() constructor. This constructor takes an iterable, such as a string, and converts it into a list by …

Refresh