list - For Loop in Python isn't working -


 inputs = []  iterations = int(input())  x in inputs:      currentinput = input()      inputs.append(currentinput)      print(x) 

that code isn't working. supposed make more "currentinput" variables based on "iterations". thank soooo, much, has been bugging me.

your code isn't working because it's not right.

your loop going through each element in list inputs. inputs empty list; haven't added loop won't work. must have meant

for x in range(iterations):     currentinput=input()     inputs.append(currentinput)     print(currentinput) 

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -