I'm doing this exercise:

> 
> In your main function, you need to keep asking user to enter an
> integer, then store those integers in a list. Once the user decides to
> stop entering, the function should print out all the integers from the
> list, and also find the largest number in that list. If the user did
> not enter any number, you should print out “Your list is empty”.
> 
> 
> 

I tried to code it but I got stuck on print "Your list is empty". I don't know where to put the statement.

And when the user enters the number, the list will come out missing the first number the user entered.

```
def main():
    user_list = []

    user_num = input('Enter an integer or enter x to stop: ')

    while user_num != 'x':

        user_num = input('Enter an integer or enter x to stop: ')

        if user_num != 'x' :
            user_list.append(user_num)

        if user_list == []:
            print('Your List is empty')
            exit()

    index = 0
    while index < len(user_list):
        user_list[index] = int(user_list[index])
        index += 1

    print ('Here is the list of the numberyou entered:')

    print (*user_list, sep = '\n')

    largest = max(user_list)

    print ('The largest number in your listis: ',largest)
main()

```