Is there any easy way or function to determine the greatest number in a python list? I could just code it, as I only have three numbers, however it would make the code a lot
#Ask for number input
first = int(raw_input('Please type a number: '))
second = int(raw_input('Please type a number: '))
third = int(raw_input('Please type a number: '))
fourth = int(raw_input('Please type a number: '))
fifth = int(raw_input('Please type a number: '))
sixth = int(raw_input('Please type a number: '))
seventh = int(raw_input('Please type a number: '))
eighth = int(raw_input('Please type a number: '))
ninth = int(raw_input('Please type a number: '))
tenth = int(raw_input('Please type a number: '))
#create a list for variables
sorted_list = [first, second, third, fourth, fifth, sixth, seventh,
eighth, ninth, tenth]
odd_numbers = []
#filter list and add odd numbers to new list
for value in sorted_list:
if value%2 != 0:
odd_numbers.append(value)
print 'The greatest odd number you typed was:', max(odd_numbers)