Questions tagged [python]
This challenge is related to the Python language. Note that challenges that require the answers to be in a specific language are generally discouraged.
143 questions
0 votes
1 answer
86 views
Golf a number bigger than all other answers [duplicate]
You have to code in python, and the number generated by your code must be bigger than all other current submissions. You need to make your code as small as possible, it has to terminate but you can ...
0 votes
1 answer
326 views
How can I shorten this Python code from 214 bytes to under 200 bytes? [closed]
I have the following Python code, which is 214 bytes long: ...
1 vote
0 answers
90 views
Write a piece of Quine code that can be excuted by both C and Python [duplicate]
Write a piece of code that is compatible with both C and Python compilers/interpreters, which can output its own source code. Quine is quite easy, but how about this double language version? Hint: To ...
6 votes
4 answers
637 views
Is there a shortest code to format string
Code Golf Challenge Given a string of 10 characters: 'abcdefghij' I want to format it in this pattern and print it in the console in a minimum number of characters: ...
8 votes
1 answer
563 views
Self-referencing tuple in python
Goal: create a self-referencing tuple satisfying x == (x,) in any version of Python. Standard libraries, matplotlib, numpy, pandas only. Answers meeting this extra ...
-3 votes
1 answer
588 views
What is the ABSOLUTE shortest way to write this code?
So I got kinda bored and was wondering if it was possible to make this code shorter without modifying anything except a file named coin.py... ...
6 votes
2 answers
450 views
Shortening this Code to process nested tuple even further without the use of max()
I have the code: ...
9 votes
2 answers
691 views
Inverting string-based binary number in one line in Python
I want to read two strings on separate lines, each string the same length and containing only 0's and 1's, and determine if the first is the one's complement of the second. How succinctly can this be ...