def get_tweets(api, t_user):
    """Get tweets from api.

    Parameters
    ----------
    api : tweepy.API
        twitter api object
    t_user : str
        The username of twitter you want to get.

    Returns
    -------
    list
        A list of tweets.

    """

    # test authentication

    try:
        api.verify_credentials()
        print('Authentication OK')
    except:
        print('Error during authentication')
        exit()

    user = api.get_user(t_user)
    tweets = api.user_timeline(screen_name=user.screen_name, count=10,
                               include_rts=False, exclude_replies=True,
                               tweet_mode='extended')
    return tweets[:10]