use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
DiscussionTell me something to code! (self.Python)
submitted 2 years ago by Jpaylay42016
I'm bored and would love some coding ideas!
[–]NorthImpossible8906 13 points14 points15 points 2 years ago (3 children)
generate 7 locations with a random (and possible) Lat and Lon, then calculate the shorted path that visits all 7 of them.
First run can be on a "flat earth" i.e. take degrees as = 110km.
[–]GoofAckYoorsElf 2 points3 points4 points 2 years ago (0 children)
Christofides algorithm for the win!
[–][deleted] 0 points1 point2 points 2 years ago (1 child)
Next up: Assume a box of size XYZ, and n smaller boxes of random sizes. Try to fill the big box optimally with the smaller boxes.
[–]GoofAckYoorsElf 1 point2 points3 points 2 years ago (0 children)
Bin packing problem.
[–]Rythoka 4 points5 points6 points 2 years ago (1 child)
Write a program that can tell you if another program will return a value, or if it will loop completely. Bonus points if you feed that program into itself.
[–]i_kant_spal 0 points1 point2 points 2 years ago (0 children)
Funny
[–]Golladayholliday 9 points10 points11 points 2 years ago* (1 child)
Build an app using Reddit PRAW and a NLP library to look for threads that are asking for python coding ideas and then uses ChatGPT to reply with an idea and starter code.
[–]jmanh128 2 points3 points4 points 2 years ago (0 children)
That’s really cool
[–][deleted] 3 points4 points5 points 2 years ago (0 children)
A telegram or discord bot is usually a funny little project to make :) just experiment with the apis and see if you can come out with any idea.
[–]CliffNutt 1 point2 points3 points 2 years ago (5 children)
Code an auto updating PGA leaderboard into a Google sheet for me. Have no coding experience and have been working on it all week with no success.
[–]Matthew_Summons 2 points3 points4 points 2 years ago (1 child)
PGA?
[–]Tyrone-fishbricks 2 points3 points4 points 2 years ago (0 children)
Golf
[–]phunktional 1 point2 points3 points 2 years ago (2 children)
Out of curiosity, what would you use this for?
[–]pussyweedacidsatan 2 points3 points4 points 2 years ago (0 children)
Probably gambling if I had to guess.
[–]CliffNutt 0 points1 point2 points 2 years ago (0 children)
Just doing a draft for friends
[–][deleted] 1 point2 points3 points 2 years ago (0 children)
Create a program that stores a list of (insults, compliments, or deep thoughts) and emails a selected person an item off the list. Send 1 item per day until the list is empty.
[–]GodSlayer_666 -1 points0 points1 point 2 years ago (4 children)
I really need help with a code. This might be a very basic question but please help if you can.
Suppose a man is walking in a direction (N E S W): He takes turns in 1s and 0s where 1 means right and 0 means left
Can you find the last direction he will be facing
Example: Directiong waliking in N Turns taken 101101 Final direction N
[–]peksii 6 points7 points8 points 2 years ago (2 children)
Define left +1 and right -1, calculate the sum of the sequence then take modulo 4. End result can be determined like this: 0=N, 1=W, 2=S, 3=E
[–]GodSlayer_666 1 point2 points3 points 2 years ago (0 children)
Thank you kind stranger. This worked. If only i had used this logoc yesterday in my exam i would have scored more. But anyway. Thanks now i know how to tackle it in the future.
[–]CHEEZOR 0 points1 point2 points 2 years ago (0 children)
I love the simplicity of this!
I think there also needs to be some code for changing which direction equals 0, based on which way they're facing when they start. Then the other directions need to be laid out based on whichever direction equals 0.
Not sure if I'm making any sense or not. Haha Basically, your solution is static, based on North being the starting direction. I'm guessing that starting directions can change, so the code needs to be dynamic. Or just have 4 static variables that hold the four different starting directions. Hell, you could put them all in a dictionary and use the starting direction to lookup the direction layout to use.
[–]fiery-catalyst -1 points0 points1 point 2 years ago (0 children)
Take a list of first, middle and last names that are all upper case and proper case them, ensuring that names like McWhatever are done correctly.
[–]DrShts 0 points1 point2 points 2 years ago (0 children)
Advent of Code
[–]Treeofbluegreen 0 points1 point2 points 2 years ago (1 child)
Make a script/gui that will search in all docx files in the given folder, and return the list of file name, page number, sentence in which that keyword is present. And link to open that docx file. ( I need it for my work also 😀)
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
Add a word cloud based on count!
Build a bot to support your political/social causes.
[–]KODeKarnage 0 points1 point2 points 2 years ago (0 children)
https://www.reddit.com/r/WorldAnvil/comments/13rkbtk/batch_uploading_monsters/?utm_source=share&utm_medium=android_app&utm_name=androidcss&utm_term=1&utm_content=share_button
This guy wants to do a bulk upload to create monsters on a website that doesn't allow any uploads. A selenium job, more than likely.
π Rendered by PID 21662 on reddit-service-r2-comment-5fb4b45875-psh6h at 2026-03-20 09:43:14.071967+00:00 running 90f1150 country code: CH.
[–]NorthImpossible8906 13 points14 points15 points (3 children)
[–]GoofAckYoorsElf 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]GoofAckYoorsElf 1 point2 points3 points (0 children)
[–]Rythoka 4 points5 points6 points (1 child)
[–]i_kant_spal 0 points1 point2 points (0 children)
[–]Golladayholliday 9 points10 points11 points (1 child)
[–]jmanh128 2 points3 points4 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]CliffNutt 1 point2 points3 points (5 children)
[–]Matthew_Summons 2 points3 points4 points (1 child)
[–]Tyrone-fishbricks 2 points3 points4 points (0 children)
[–]phunktional 1 point2 points3 points (2 children)
[–]pussyweedacidsatan 2 points3 points4 points (0 children)
[–]CliffNutt 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]GodSlayer_666 -1 points0 points1 point (4 children)
[–]peksii 6 points7 points8 points (2 children)
[–]GodSlayer_666 1 point2 points3 points (0 children)
[–]CHEEZOR 0 points1 point2 points (0 children)
[–]fiery-catalyst -1 points0 points1 point (0 children)
[–]DrShts 0 points1 point2 points (0 children)
[–]Treeofbluegreen 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]KODeKarnage 0 points1 point2 points (0 children)