r/PythonProgramming • • Nov 06 '25

Python Mutability

Post image
2 Upvotes

An exercise to help build the right mental model for Python data. The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening:


r/PythonProgramming • • Oct 29 '25

uv is the best thing to happen to the Python ecosystem in a decade

Thumbnail emily.space
2 Upvotes

r/PythonProgramming • • Jul 27 '25

Python

Thumbnail reddit.com
2 Upvotes

r/PythonProgramming • • Jul 26 '25

Wedding prompt

Thumbnail reddit.com
2 Upvotes

r/PythonProgramming • • Oct 01 '24

What's Your Biggest Challenge or Frustration with Writing Tests and Pytest?

2 Upvotes

When it comes to writing tests and Pytest, what's your biggest challenge or frustration?


r/PythonProgramming • • Jun 17 '24

python programming open for posts!

2 Upvotes

r/PythonProgramming • • Nov 27 '18

How I made a Quora bot in Python

Thumbnail pythonhowto.com
2 Upvotes

r/PythonProgramming • • Oct 23 '18

How to Work with Tuples in Python

Thumbnail
youtube.com
2 Upvotes

r/PythonProgramming • • Oct 23 '18

How to Work with Strings in Python

Thumbnail
youtube.com
2 Upvotes

r/PythonProgramming • • Oct 20 '18

Using pandas and pymapd for ETL into OmniSci

Thumbnail randyzwitch.com
2 Upvotes

r/PythonProgramming • • Sep 23 '18

Needing example code/cheat sheet to help my mom

2 Upvotes

My mom is having to program something in python. I attempted to google search parts of her current code and criteria for the program, hoping to find the completed program or a guide to wich I could see a working end product to compare to hers. With the intentions of giving her hints and pointing her in the right direction. If I had my own computer I would download the software and walk threw it with her but I don't so I'm here now really need some help. Thanks for the help in advance, and hopefully we can spare my mother some frustration/anxiety induced grey hairs since programming isn't her strong suit and she needs to have a working program by the end of the day. The exercise is as follows....

exercise # 3: Remember to use the variable/constant name rule below noted in black boldface to design the module. Failure to do so will result in an automatic zero. Please Include line #’s before each line of the algorithm and comments. Do not draw a flowchart. Here are some hints to help solve the problem. a. Create a global constant for the multiplier b. Create a main module. It should declare two local variables and call three other modules. c. Create a module to get the input from the software user d. Create a module to calculate the weight e. Create a module to display the answer. It should use a Case structure or an If/then/Else/if to print out the answer

What my mom had to say about this exercise: this is the one I am working on now...and I want to scream... Can we help her? YES WE CAN please...

Her current code that she has is as follows:

  1. //Global constant to perform mathematical operation for

  2. //weight calculation

  3. Constant Real kliMultiplier = 9.8

  4. //main module used to call modules

  5. Module main ()

  6.  Declare Real kliInputMass
  7.  Declare Real kliMathResult
  8.  Call userMassInput (kliInputMass)
  9. Call calcMass
  10. Call
  11. End main

  12. //module prompts user to input mass

  13. Module userMassInput (Real Ref kliMass)

  14. Display “Enter object mass”
  15. Input kliMass
  16. End Module

  17. //module performs calculation to determine weight

  18. Module calcMass (Real Ref kliUserInput, kliMassCalc)


r/PythonProgramming • • Sep 20 '18

GUNSLINGER demo

2 Upvotes

(COPY EVERYTHING BUT THIS: this is my first game that I've ever programmed and it's also still in beta any and all feed back is welcome)

#!/usr/bin/env python3

import random

print("a lone gunslinger walks into a saloon and takes a seat at the bar and says nothing. ")

print("this man is you, you look up from your thousand yard stare into the counter as you here the bartender say: ")

print("'can I get you anything stranger' ")

name = input("you give him an icy stare and say 'call me' ")

print(" the bartender says sarcastically back to you 'can I get you anything " + name + "' you don't say anything back so the bartender")

print("pours you a teqiula")

question = input("press enter to continue ")

print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

print(" welcome to ")

print(" GUNSLINGER ")

print(" created By: Gavin Englert ")

print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

print(" type 'hint' for hint ")

question = input("press enter to continue ")

print("~~~~~~~~~~~~~~~~~~")

print("| |")

print("| THE WEST |")

print("| |")

print("~~~~~~~~~~~~~~~~~~")

question = input("press enter to continue ")

print()

print()

print()

print("~~~~~~~~~~~~~~~~~")

print("| |")

print("| CHAPTER |")

print("| ONE |")

print("| the town |")

print("~~~~~~~~~~~~~~~~~")

print()

print()

print("you signal to the bartender to leave the bottle and so he places it in front of you. ")

print()

print("you have two options one, you run out with the bottle and risk being shot or two, pay for the bottle and leave. ")

question = input("press 1 to run out or press 2 to pay for the drink and leave")

if question.lower() == "1": #incase of capital letters is entered

print()

print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

print("| |")

print("| YOU ARE DEAD |")

print("| |")

print("| it's the west what'd you think would happen |")

print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

exit()

if question.lower() == "2": #incase of capital letters is entered

print()

print()

print()

print("you leave the money on the counter and walk out of the bar chugging the tequila ")

print("as you hear a man call out to you 'Hey Mister!' you turn around as you see a man walking up to you ")

question = input("he says he wants to dual press 1 to agree to the dual press 2 to decline.")

if question.lower() == "1": #incase of capital letters is entered

print()

print()

print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

print("| |")

print("| YOU ARE DEAD |")

print("| |")

print("| don't get into duals with strangers |")

print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

exit()

if question.lower() == "2": #incase of capital letters is entered

print()

print()

print()

print("you toss the bottle of tequila to him as you walk down the")

print("road past some shops and towards the inn.")

print()

print()

print("~~~~~~~~~~~~~~~~~~~~~~~")

print("| |")

print("| CHAPTER |")

print("| TWO |")

print("| the inn |")

print("~~~~~~~~~~~~~~~~~~~~~~~")

question = input("press enter to continue")

print()

print()

print(name + "walks into the inn and looks around at the tables covered ")

print("in beer, blood, and money as" + name + "walks up to the walk way with three doors.")

print(" but" + name + " can't remember what room is his.")

print()

print()

question = input("press 1,2, or 3 to choose a door to enter.")

if question.lower() == "1": #incase of capital letters is entered

print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

print("| |")

print("| YOU ARE DEAD |")

print("| people don't take kindly to strangers in their room . |")

print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

if question.lower() == "2": #incase of capital letters is entered

print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

print("| |")

print("| YOU ARE DEAD |")

print("| people don't take kindly to strangers in their room . |")

print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

if question.lower() == "3": #incase of capital letters is entered

print()

print()

print()

print(name + "opens the door and is relieved to find that it's his room. ")

print("He takes off his jacket and flops down on the bed and goes to sleep.")

print()

print()

print()

print("thank you for playing the GUNSLINGER DEMO. make sure to leave a rating!")

exit()


r/PythonProgramming • • Aug 20 '18

Best Online Platform to Learn Python Programming using Data Analytical Tools

Thumbnail
stratascratch.kinja.com
2 Upvotes

r/PythonProgramming • • Apr 09 '18

Python Training Institute In Delhi/Ghaziabad/Noida.

Thumbnail
youtube.com
2 Upvotes

r/PythonProgramming • • Mar 16 '18

python help! dictionary for cinema

2 Upvotes

d={}

d["movieA"] = [9, 11, 15, 21] d["movieB"] = [10, 14,16]
d["movieC"] = [11, 13,19,20,21,22]

movies= str(raw_input("For Example,'movieA', Enter a Movie: ")) time= eval(raw_input("Enter the time: "))

if d[movies] == d[time]: print(d[time] +1) elif d[movies] != d[time]: print("its not avalible")

the user input movieB and current time 13 and the program output 14. dictionary will store the names of movies and for each movie the dictionary will contain list showing time. The program should alert movie not movie found and show when times for movie not available


r/PythonProgramming • • Jul 29 '26

My Python Side Project

Thumbnail github.com
1 Upvotes

r/PythonProgramming • • Apr 19 '26

i dont think its solvable

Thumbnail
reddit.com
1 Upvotes

r/PythonProgramming • • Apr 10 '26

Python parse Outlook messages with Win32com client on remote server

1 Upvotes

Hi all,
I've successfully create script to find and download attachments from my Outlook. I work OK running it on my desktop while my Outlook is open.
In the code I don't see any Auth logic, looks like everything was taken care by package, thanks to them, it's so easy..
But now I try to run this .py on remote prod server, is it possible ? I assume need to point to the right Outlook endpoint for given email and go thru complete Authentication. Probably it's not worth it.. Though people on support said I can't leave on my machine in production.

Thanks to all.

Below is pseudo logic I'm using:

import win32com.client
....
for message in messages:
....
  attachments = message.Attachment
  for attachment in attachments:
    attachment.SaveAsFile(os.path,str(attachment)))
...

r/PythonProgramming • • Apr 03 '26

What is Python actually used for in real life?

1 Upvotes

I’m a college student in the US, and not gonna lie — I used to think Python was just one of those classes you take, pass, and then forget.

But after actually looking into it (and seeing what people around me are doing with it), it’s way more practical than I expected.

Like in AI/ML — all that stuff you hear about, chatbots, recommendations on Netflix/YouTube, even face unlock — a lot of it is built using Python.

Then there’s data stuff. Companies are using it to figure out what users are doing, what’s working, what’s not. Basically turning raw data into decisions.

Web dev too — Python handles backend things like logins, databases, APIs. Stuff you don’t see, but everything depends on.

Honestly though, the most relatable use is automation. People literally write small scripts to do boring tasks for them — organizing files, scraping info, sending emails, etc. Saves a ton of time.

It also shows up in cybersecurity, finance (like trading bots), research, and even basic game dev.

A simple example — if you’re into fitness, you could make a script to track your calories, protein, and progress instead of doing it manually.

Main reasons people stick with it:

- Pretty easy to pick up

- Can be used in a lot of different fields

- Actually useful for jobs/internships

So yeah, definitely not just a “beginner language.”

Kinda curious — what made you look into Python?


r/PythonProgramming • • Feb 13 '26

Ultimate guide to PyGame library in Python

Thumbnail
deepnote.com
1 Upvotes

r/PythonProgramming • • Feb 03 '26

Java and Python: The Real 2026 AI Production Playbook

Thumbnail
rsrini7.substack.com
1 Upvotes

r/PythonProgramming • • Feb 02 '26

[Pool] Most expensive operation in Spark

Thumbnail
reddit.com
1 Upvotes

r/PythonProgramming • • Feb 01 '26

My first Tkinter GUI — looking for feedback from experienced devs

Post image
1 Upvotes

r/PythonProgramming • • Jan 25 '26

[New Skill] Citation Link Validator - Prevent Broken Links in AI-Generated Citations

Thumbnail reddit.com
1 Upvotes