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

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -