python

Back Open Paginator
10.01.2026 17:30
Reuven (@Reuven@fosstodon.org)

Use parentheses to split long #Python code across lines:

if x == 10 and
y == 20:
print('Yes!') # ☹️

But with parentheses, Python sees it as one line:

if (x == 10 and
y == 20): # 🙂
print('Yes!')

Or in comprehensions…

[x*5
for x in range(10)
if x % 2]




Show Original Post


10.01.2026 17:17
superviviansunshine (@superviviansunshine@jorts.horse)

Wrote a program to calculate interest after a set period.
Because I wanted to check whether Fry's 93 cents becoming 4.3 billion after 1000 years was accurate.
The interest currently compounds every year, which may not be realistic.
Next step: add a method to calculate interest w/o compounding.
Then implement a way to have it compound every set # of years.
#Python #Termux #GirlsWhoCode





Show Original Post


10.01.2026 17:05
jobsfordevelopers (@jobsfordevelopers@mastodon.world)

Affirm is hiring Senior Software Engineer, Backend (Powered by Affirm)

🔧 #kotlin #python #aws #kubernetes #mysql #seniorengineer
🌎 Remote; Canada
⏰ Full-time
🏢 Affirm

Job details jobsfordevelopers.com/jobs/sen
#jobalert #jobsearch #hiring




Show Original Post


10.01.2026 17:01
PythonPeak (@PythonPeak@mastodon.social)

Python Collections Ordereddict

collections.OrderedDict for maintaining insertion order
Dictionary that remembers insertion order
Regular dict (Python 3.7+ maintains order, but OrderedDict is explicit)

youtube.com/watch?v=eAvKvvilA8A




Show Original Post


10.01.2026 16:38
novaTopFlex (@novaTopFlex@mastodon.social)

Even though 3 has generally remained relatively consistent in the basic form of the programming language, many features have at least slightly been remodeled, including in the essential and modules of the programming language. For instance, `sys.platform` no longer contains the Linux version as of Python 3.3 nor the AIX version as of Python 3.8. Beginning with Python 3.13, is no longer identified by the generic term, "Linux."




Show Original Post


10.01.2026 16:35
novaTopFlex (@novaTopFlex@mastodon.social)

Since the versions of have remained very similar throughout the era of Python 3, even as far back as 2008, do you have any recommendations for using the basic library features in order to differentiate between code designed for Python 3.0 and for Python 3.15+?




Show Original Post


10.01.2026 15:48
PythonPeak (@PythonPeak@mastodon.social)

Why Is This Taking So Long

A Python developer conversation about why is this taking so long

youtube.com/watch?v=m-0Sjg0MtL8




Show Original Post


10.01.2026 15:44
PythonPeak (@PythonPeak@mastodon.social)

Python Operator Precedence Quiz

Can you solve this? Python operator precedence matters! Watch 2 + 3 * 4. Do you know the order? Test your Python knowledge!

youtube.com/watch?v=RfHA446_hFA




Show Original Post


10.01.2026 15:09
novaTopFlex (@novaTopFlex@mastodon.social)

The following code will be displayed in an upcoming video:

if sys.platform == "linux":
print("Linux")
elif sys.platform == "ios":
print("iOS")
elif sys.platform == "win32":
print("Windows")
elif sys.platform == "darwin":
print("macOS")
else:
print("Other")

For the resulting code snippet example, please feel free to showcase your resulting output, and the video will be uploaded soon at youtube.com/@novaTopFlex.




Show Original Post


10.01.2026 15:04
ginimod (@ginimod@mastodon.social)

@davep
Sorry for my english
issue = Problématique = Question

For me, obs2nlm is the entry point to a RAG (Retrieval-Augmented Generation) with NoteBookML

i made the same with and for a local Ollama instance, i use langchain, langchain_ollama, langchain_chroma




Show Original Post


10.01.2026 15:02
novaTopFlex (@novaTopFlex@mastodon.social)

The following are recognized in `sys.platform` in the programming language:

→ "aix"
→ "android" ("linux" prior to Python 3.13)
(compiler) → "emscripten"
→ "ios"
→ "linux"
→ "darwin"
→ "win32"
→ "cygwin"
→ "wasi"




Show Original Post


10.01.2026 14:59
novaTopFlex (@novaTopFlex@mastodon.social)

To test for with the interpreter, the following code is correct:

if sys.platform == "darwin":
print(True)
else:
print(False)




Show Original Post


1 ...677 678 679 680 681 682 683 684 685 686 687 ...1584
UP