How Can I Add N User Inputs Into A List Using A While Loop?
question = "" while question not in questionList: question = questionList.append(input("Whats your question? ")) if question in questionList: break elif question == "none": break
What I am trying to do is to have the user ask a question repeatedly until either input "none" or until they repeat themselves. The things they input should go into the "questionList" list The only problem is that my code doesn't break no matter what. How can I get the while loop to break?
question = "_" questionList= while question != "": question = str(input("Whats your question? ")) if question == None or question in questionList: break questionList.append(question) # returns None
- → What are the pluses/minuses of different ways to configure GPIOs on the Beaglebone Black?
- → Django, code inside <script> tag doesn't work in a template
- → React - Django webpack config with dynamic 'output'
- → GAE Python app - Does URL matter for SEO?
- → Put a Rendered Django Template in Json along with some other items
- → session disappears when request is sent from fetch
- → Python Shopify API output formatted datetime string in django template
- → Shopify app: adding a new shipping address via webhook
- → Shopify + Python library: how to create new shipping address
- → shopify python api: how do add new assets to published theme?
- → Access 'HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT' with Python Shopify Module