I'm trying to create a list of size n whose elements are names - both are user inputs. Here is the following code:
names = []
for _ in range(int(input("Number of names to query (n): "))):
names = names.append(input("Enter the names to query: "))
I get an AttributeError: 'NoneType' object has no attribute 'append' I don't understand what this means and why this is happening. names seems to be a list object?
print(type(names))
<class 'list'>