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

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

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -

c# - Populating Gridview inside Listview ItemTemplate On Web User Control from Code Behind -