Definition: In this task you will be given a list of numbers. You should remove any number that is not an integer (whole number). If every number is not an whole number then an empty list ("[]") should be returned. Otherwise, answer with the list of whole numbers separated by comma inside brackets.
Input: [-7, 12.645, 48.591, -47.946, 36.504, 31, 50.592]

[-7, 31]