import random

def rollDice(n):
    rollsList = []
    
    while n > 0:
        rollsList.append(random.randint(1,20))
        n -= 1

    print(rollsList)
    return max(rollsList)

rollDice(3)
[18, 5, 15]
18