How to compare user input in python using list?

Compare user input in python using list:
I need to display the pin number in the list that are compare to user input using ATM concept.

  1. lst=[123,456,789]
    pin=int(input("Enter Pin number: "))
    if pin in lst:
       print("Choose your wanted...\n1.Cash withdrawal\n2.Cash Deposit")
       print("Please enter correct pin number")
If pin number correct then



1 comment:

  1. Thank you for sharing an amazing & wonderful blog. This content is very useful, informative and valuable in order to enhance knowledge. Keep sharing this type of content with us & keep updating us with new blogs. Apart from this, if anyone who wants to join the Python Advanced training institute in Delhi, can contact 9311002620 or visit our website-


Recent Posts

Service Support

Need our help to Learn or Post New Concepts Contact me