About 664,000 results
Open links in new tab
  1. python - Get a list of numbers as input from the user - Stack …

    numbers = input() print(len(numbers)) the input [1,2,3] and 1 2 3 gives a result of 7 and 5 respectively – it seems to interpret the input as if it were a string. Is there any direct way to …

  2. python - How do I convert user input into a list? - Stack Overflow

    a=list(input()). It converts the input into a list just like when we want to convert the input into an integer.

  3. python - How do I have a user input a list? - Stack Overflow

    Oct 19, 2021 · I need to have users input a list for my program in order for it to work properly, and the list needs to be formatted like [1,1,2]. This is the code gathering the list input: entry = list …

  4. How to input a list in Python? - Stack Overflow

    Apr 8, 2018 · How to input a list in Python? Asked 7 years, 8 months ago Modified 6 years, 10 months ago Viewed 3k times

  5. python - How do I store user input into a list? - Stack Overflow

    Apr 4, 2015 · For example if I have a user input called num: num = int (input ('Enter numbers')) I want to be able to store these numbers into a list to be manipulated. How can I go about this? …

  6. How can I make a list of lists from user input? - Stack Overflow

    sub_list.append(input()) s.append(sub_list) print(s) Note that, in general, you should use for every time that you have to iterate sequentially over an object or you know how many times to repeat …

  7. How to pass a list as an input of a function in Python

    Feb 1, 2016 · How to pass a list as an input of a function in Python Asked 9 years, 10 months ago Modified 7 years ago Viewed 104k times

  8. How do I add User Input (String) into a list? - Stack Overflow

    Sep 4, 2022 · When you print out the value of list, Python interprets this as the list data-types. You can fix your issue by changing the variable name to something like l or my_list.

  9. python - add user input to list - Stack Overflow

    May 2, 2016 · I want it to ask the user to input their favorite film and it to add that input at the end of the list and then display the list again. as well as making sure the film entered is not in the …

  10. Python, How to save user input to list - Stack Overflow

    Oct 9, 2013 · Python, How to save user input to list Asked 12 years, 2 months ago Modified 12 years, 2 months ago Viewed 28k times