I've been learning some lists lately and I wanted to make program that asks for x nubmer of elements that should list contain and then ask for elements in lists and if there is x elements in list while loop breaks and print out elements and how much elements there are so thats my code:
num = input("How many numbers you want to put into a list?: ")
while True:
list = [input()]
if len(list) == num:
break
def get_number_of_elements(list):
count = 0
for element in list:
count = count + 1
return count
print(get_number_of_elements(list))
print(list)
and when i run code it still asks for elements in list and i dont know what to do.