So I have this code:
subreddit = reddit_obj.subreddit("ProgrammerHumor")
post_types = {
"hot" : subreddit.hot,
"new" : subreddit.new,
"top" : subreddit.top,
"rising" : subreddit.rising,
}
post_type = input("What post type?: ")
post_time = input("What time range?:")
posts = post_types[post_type](post_time)
This was my thought process:
What I was trying to do was make it so I could have one function get posts of type X at time Y. By time I'm referring to like, hour, day, month, etc, so I didn't have to make a function for each post type since that would be inefficient, and I didn't want to have a bunch of elif statements since that woul

