I'm very new to coding. I'm trying to have the user input a number, that input is checked to see if it says "stop", then the number is added to a list. I want it to keep going until you type "stop" and then display the list. I've tried a bunch of different ways and I feel like I'm getting no where. def listsample(): sample = [] killcode = str("stop") sample.append(input("enter number")) while sample[-1] != killcode: if killcode not in sample: sample.append(input("enter number")) elif killcode in sample: return sample def printsample(sample): print(sample) listsample() printsample(listsample()) I've tried moving stuff around a lot. I didn't keep my previous trial and error samples. I understand the bare minimum of loops and stuff, this is kind of me trying to figure them out. Continue reading...