我需要编写一个程序来检查用户输入的数字。如果用户多次输入一个数字,那么它将跳过它并仅打印出用户输入一次的数字。
我在玩这个:
def single_element():
numbers = []
numbers = input("Enter some numbers: ").split()
for i in numbers:
if i in numbers:
i + 1 #I was trying to find a way to skip over the number here.
print(numbers)