📜  如何在python代码示例中打印最小的数字

📅  最后修改于: 2022-03-11 14:46:07.053000             🧑  作者: Mango

代码示例1
# creating empty list
lis = []

# user enters the number of elements to put in list
count = int(input('How many numbers? '))

# iterating till count to append all input elements in list
for n in range(count):
    number = int(input('Enter number: '))
    lis.append(number)

# displaying smallest element
print("Smallest element of the list is :", min(lis))