User Input for a List | Python Programming language Tutorial

Поделиться
HTML-код
  • Опубликовано: 29 окт 2020
  • In this tutorial, you will learn to take user input for list in Python Programming language.
    Here we are using the append method / function to the values to the list. In the end we will also display the contents of the list.
    our Social Media Pages
    / exampleprogram
    / exampleprogram
    / example_program
    Our Website
    www.ExampleProgram.com
    #ExampleProgram

Комментарии • 54

  • @nisuill
    @nisuill Год назад +6

    Damn, this was exactly what I needed. Thanks! You saved me from quite a sob-fest this afternoon. 😁

  • @candymanAM
    @candymanAM Год назад +9

    Great video just what I was looking for. Nothing better than finnaly finding exactly what you needed lol.

  • @DaRza17
    @DaRza17 Год назад

    Is the "casefold" method to avoid errors caused by "wrong" input from the user?

  • @wolfmasterworld1663
    @wolfmasterworld1663 Год назад +1

    Thank you sooo muchhh for the tutorial!

  • @jonasclarkamps
    @jonasclarkamps 2 года назад +2

    Awesome. Thank you.

  • @paullin178
    @paullin178 Год назад

    what if i want to add more details such as location

  • @njavamonkb
    @njavamonkb Год назад +3

    really really nice ....thank you

  • @arunpandiyans3304
    @arunpandiyans3304 Год назад

    How to give heterogeneous values as user input for list

  • @suryagounidivya9374
    @suryagounidivya9374 Год назад

    I want to restrict the user to enter only numbers between 1-100..
    I created a loop for it everything is good.. but i am not able to restrict it.. can you please help me? I am new learner!

  • @francismannion7075
    @francismannion7075 2 месяца назад +1

    Excellent, thank you!

  • @matrixikari
    @matrixikari 2 месяца назад +1

    this was awesome, thank you good sir.

  • @ferryardiansyah2261
    @ferryardiansyah2261 Год назад +1

    Thank you, very helpfull 😀

  • @mrluacoder
    @mrluacoder Год назад

    Thx, btw if it doesn't work replace casefold with lower

  • @SweetPeachannel
    @SweetPeachannel Год назад

    How to show terminal on Python notebook please?

  • @Nazarick_018
    @Nazarick_018 2 года назад

    valeu, de verdade

  • @alxya544
    @alxya544 Год назад +6

    Very nice tutorial! But when I tested it, It asked me the 2 questions then it kept REPEATING and it didn't show me the list😅 I think its because in python replit while means loop, can you help?

  • @davidbencosme6655
    @davidbencosme6655 2 года назад +1

    Much helpful my guy

  • @abujihadsalahudin
    @abujihadsalahudin 2 года назад +1

    Thanks for the video

  • @douglasvera8381
    @douglasvera8381 Год назад +1

    Thank you very much

  • @user-bk3jb9id5l
    @user-bk3jb9id5l Год назад +1

    THANK YOU so much

  • @joaodasilva770
    @joaodasilva770 2 года назад

    thanks for the video, what if I want to ask the user to type a name to remove it?

    • @bananaonana3665
      @bananaonana3665 Год назад

      user = input("would you like to remove a mistake? ")
      if user.lower() == 'yes' :
      state = input("What state would you like to remove? ")
      if state in stateList:
      stateList.remove(state)
      print("removed", state)
      else:
      print("Sorry, that item is not in the list.")

  • @aravdagamer9977
    @aravdagamer9977 Год назад +1

    Thank you sir.

  • @Ev.Paul_723
    @Ev.Paul_723 3 месяца назад +1

    Good Explanation

  • @MsHackthat
    @MsHackthat 2 года назад +2

    What if intead of name, i want to add numbers?

    • @ExampleProgram
      @ExampleProgram  2 года назад +1

      convert your user input to int or float and then add to the list

    • @kingleo429
      @kingleo429 2 года назад

      @@ExampleProgram yes do that. 👍

  • @samsamson1414
    @samsamson1414 3 года назад +1

    good work

  • @atharvnigam8107
    @atharvnigam8107 Год назад +1

    thanks bro :D

  • @maheshpurbia5135
    @maheshpurbia5135 Год назад

    how to try it with a for loop

    • @wajehulhassan6675
      @wajehulhassan6675 Год назад +1

      print('How many values do you want to enter? ')
      num = int(input())
      a = []
      for i in range(1,num+1):
      print('Enter value ',i)
      b = input()
      a.append(b)
      print(a)

  • @puneethkurrala5151
    @puneethkurrala5151 Год назад

    numbers=[]
    e=1
    while e!=0:
    numbers.append(int(input("enter the numbers=")))
    e=int(input("enter 0 to stop="))
    def chintu(p):
    return p%2==0
    even=list(filter(chintu,numbers))
    for element in even:
    print(even)
    above code is to filter the even numbers inthe list

    • @Mstarotdior
      @Mstarotdior 8 месяцев назад

      y does it say it has no name type?

  • @tanishonyt7926
    @tanishonyt7926 Год назад

    Bhai Hindi ko bhi Zara vapro

  • @eyupburakylmaz7710
    @eyupburakylmaz7710 Год назад

    Hi I am trying to solve a question
    Example input data:
    4 0 5 0 3 0 0 5
    Example result:
    4 5 3 5 0 0 0 0
    I ask a number for input from user and make all non zero numbers on the left (in order) and all zeros right. Could you help me?