Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 11553

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.

3 votes
Accepted

"Almost Sorted" coding challenge

Some general/PEP8-related comments: Functions are usually to be named snake_case() in Python (PEP8) Usually variables should have proper names. …
moooeeeep's user avatar
  • 430
0 votes

Idiomatic way to construct a SQL INSERT query in Python

The even better way to insert many records, is to use cursor.executemany() instead. You did not state what API you use, but AFAIK at least the libraries commonly used with PostgreSQL, MySQL and SQLi …
moooeeeep's user avatar
  • 430
3 votes
2 answers
636 views

Hello World using Python embedded in C++, with RAII library initialization

for the macro void Python_DecreaseRefCount(PyObject* p) { Py_DECREF(p); } int main() { // declare struct and create instance that handles global initialization and // deinitialization of Python
12 votes

Comparing Old vs. New: Temperature Converter

eval() is considered harmful and should not be used - especially so with user input strings: It allows users of your code to execute arbitrary code, including to drop to REPL. You may use ast.litera …
Community's user avatar
  • 1