User Input for a List | Python Programming language Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ย. 2024
  • 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.ExamplePro...
    #ExampleProgram

ความคิดเห็น • 56

  • @nisuill
    @nisuill ปีที่แล้ว +7

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

  • @candymanAM
    @candymanAM 2 ปีที่แล้ว +10

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

  • @njavamonkb
    @njavamonkb ปีที่แล้ว +3

    really really nice ....thank you

  • @matrixikari
    @matrixikari 4 หลายเดือนก่อน +1

    this was awesome, thank you good sir.

  • @francismannion7075
    @francismannion7075 4 หลายเดือนก่อน +1

    Excellent, thank you!

  • @Ev.Paul_723
    @Ev.Paul_723 4 หลายเดือนก่อน +1

    Good Explanation

  • @wolfmasterworld1663
    @wolfmasterworld1663 ปีที่แล้ว +1

    Thank you sooo muchhh for the tutorial!

  • @alxya544
    @alxya544 ปีที่แล้ว +7

    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

  • @jonasclarkamps
    @jonasclarkamps 2 ปีที่แล้ว +2

    Awesome. Thank you.

  • @aravdagamer9977
    @aravdagamer9977 ปีที่แล้ว +1

    Thank you sir.

  • @ferryardiansyah2261
    @ferryardiansyah2261 ปีที่แล้ว +1

    Thank you, very helpfull 😀

  • @douglasvera8381
    @douglasvera8381 ปีที่แล้ว +1

    Thank you very much

  • @user-bk3jb9id5l
    @user-bk3jb9id5l ปีที่แล้ว +1

    THANK YOU so much

  • @codewithsameer-r
    @codewithsameer-r หลายเดือนก่อน +1

    nice☺☺☺

  • @abujihadsalahudin
    @abujihadsalahudin 2 ปีที่แล้ว +1

    Thanks for the video

  • @DaRza17
    @DaRza17 ปีที่แล้ว

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

  • @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!

  • @atharvnigam8107
    @atharvnigam8107 ปีที่แล้ว +1

    thanks bro :D

  • @mrluacoder
    @mrluacoder ปีที่แล้ว

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

  • @SweetPeachannel
    @SweetPeachannel ปีที่แล้ว

    How to show terminal on Python notebook please?

  • @samsamson1414
    @samsamson1414 3 ปีที่แล้ว +1

    good work

    • @ExampleProgram
      @ExampleProgram  3 ปีที่แล้ว

      Thank you

    • @samsamson1414
      @samsamson1414 3 ปีที่แล้ว

      @@ExampleProgram can you do a video like this for nested list

  • @myerwerl
    @myerwerl 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. 👍

  • @paullin178
    @paullin178 ปีที่แล้ว

    what if i want to add more details such as location

  • @arunpandiyans3304
    @arunpandiyans3304 ปีที่แล้ว

    How to give heterogeneous values as user input for list

  • @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.")

  • @Nazarick_018
    @Nazarick_018 2 ปีที่แล้ว

    valeu, de verdade

  • @maheshpurbia5135
    @maheshpurbia5135 2 ปีที่แล้ว

    how to try it with a for loop

    • @wajehulhassan6675
      @wajehulhassan6675 2 ปีที่แล้ว +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 10 หลายเดือนก่อน

      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?