About 3,120,000 results
Open links in new tab
  1. python - How to assign user input to a variable or list - Stack Overflow

    Oct 19, 2011 · user_input_list = input("Enter your name and age:").split(' ') This creates a list of each space-separated word in the input. >>> 'George 25'.split(' ') ['George', '25']

  2. Variables and user input in python – allinpython.com

    In this post, you will learn what are variables and how to take input from the user in Python with very basic explanation and examples, So let’s start learning both concepts one by one. A …

  3. Python User Input - W3Schools

    Python allows for user input. That means we are able to ask the user for input. The following example asks for your name, and when you enter a name, it gets printed on the screen: Ask …

  4. Python Variables and User Input: A Beginner's Guide

    Jul 1, 2023 · Variables and user input play a crucial role in making Python programs more interactive and adaptable. Understanding how to declare variables and take user input allows …

  5. Taking multiple inputs from user in Python - GeeksforGeeks

    Dec 3, 2024 · One of the simplest ways to take multiple inputs from a user in Python is by using the input() function along with the split() method. The split() method splits a string into a list …

  6. Python User Input from Keyboard - input() function - AskPython

    Jul 8, 2019 · Python user input from the keyboard can be read using the input() built-in function. The input from the user is read as a string and can be assigned to a variable. After entering …

  7. python - setting user input to variable name - Stack Overflow

    Apr 23, 2015 · I am using python and would like to know if it would be possible to ask the user for the name of a variable and then create a variable with this name. For example: my_name = …

  8. How to Get User Input and Store It in a Variable in Python

    Mar 18, 2025 · By understanding how to capture, store, and convert user input, you can build dynamic and user-friendly applications. Remember to validate input and handle potential …

  9. Convert User Input String to Variable name - CodeSpeedy

    Ever wondered about converting a user input string into a variable name in Python? In this tutorial, we are going to learn how to Convert a User Input String into a Variable name using Python. In …

  10. Input and Assign to Variable - Educative

    Taking input from a user; The built-in input() function. How does the user know what they are required to input? Where has the user’s input gone? Variable assignment; The fulfilled project …

  11. Some results have been removed
Refresh