# your code goes hereimport praw
from datetime import datetime, timezone

client_id = 'xxx'
client_secret = 'xxx'
username = 'xxx'
password = 'xxx'

reddit = praw.Reddit(client_id=client_id,
                     client_secret=client_secret,
                     username=username,
                     password=password,
                     user_agent='xxx')

subreddit_name = 'xxx'
subreddit = reddit.subreddit(subreddit_name)

post_count = 0

last_post_name = None

for _ in range(3):

    posts = subreddit.new(limit=None, params={'after': last_post_name})

    for submission in posts:
        post_date = datetime.fromtimestamp(submission.created_utc, tz=timezone.utc)
        print(f"Post ID: {submission.id}, Date: {post_date}")
        post_count += 1
        last_post_name = submission.fullname

print(f"Amount of Posts: {post_count}")