Questions tagged [python]
Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability. Use the python tag for all Python related questions. If you believe your question may be even more specific, you can include a version specific tag such as python-3.x.
15,587 questions
4 votes
4 answers
99 views
Substitute patterns with values from lists
I was looking at a Stack Overflow question and got somewhat carried away with improving the solution, well beyond the scope of that question. In summary, we have a string such as ...
1 vote
2 answers
80 views
ASCII-based Lightweight Browser with Clippy-Style Helper in Python [duplicate]
Note that this is the original version which has not been formatted to comply to PEP-8 and contains an error in the code. Please visit the updated version instead to post answers, comments and/or cast ...
4 votes
2 answers
648 views
Unicode-based platformer game in Python (Updated)
I already asked this question, but the script I provided was not compliant to PEP-8, so I rewrote the script for better readability. I'm making a platformer game called Uni where this small character ...
3 votes
5 answers
614 views
List folders with size
This code below aim to listing all folders in one directory and get size of each in byte. It uses only pathlib module for that. ...
2 votes
3 answers
1k views
LeetCode 3542: Minimum Operations to Convert All Elements to Zero
I am working on this LeetCode problem where I have to count the minimum number of operations to make all elements in an array equal to zero 3542. Minimum Operations to Convert All Elements to Zero ...
4 votes
1 answer
226 views
Use z3py to solve one logic constraint puzzle
I decided to practice by modeling some simple, hand-solvable problems using z3py. Below is an example: ...
8 votes
3 answers
125 views
Test to ensure CGI can be invoked on a local server
I am writing tests for legacy software which has a dependency on CGI scripts on a remote machine. Mocking the dependency would entail modifying the code under test, which is a thing I cannot do at the ...
8 votes
3 answers
2k views
Replacement for "make" in Python
I'm working on a replacement for make written in Python. Instead of a Makefile, you create a Wormfile.py. This file gets imported dynamically and a Context object ...