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]
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

Affirm is hiring Senior Software Engineer, Backend (Powered by Affirm)
🔧 #kotlin #python #aws #kubernetes #mysql #seniorengineer
🌎 Remote; Canada
⏰ Full-time
🏢 Affirm
Job details https://jobsfordevelopers.com/jobs/senior-software-engineer-backend-powered-by-affirm-at-affirm-com-dec-17-2025-eac26c?utm_source=mastodon.world&utm_medium=social&utm_campaign=posting
#jobalert #jobsearch #hiring
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)
#python #programming #tutorial #coding #collections #ordereddict
https://www.youtube.com/watch?v=eAvKvvilA8A
Even though #Python 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 #os and #sys 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, #Android is no longer identified by the generic term, "Linux."
Since the versions of #Python have remained very similar throughout the era of Python 3, even as far back as 2008, do you have any recommendations for #versioncontrol using the basic library features in order to differentiate between code designed for Python 3.0 and for Python 3.15+?
Why Is This Taking So Long
A Python developer conversation about why is this taking so long
#python #coding #developer #programming #bug #error
https://www.youtube.com/watch?v=m-0Sjg0MtL8
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!
#python #pythontricks #codingtips #programmingtutorial #pythonoperators #operatorprecedence #pythonmath #pythonquiz #codingchallenge #pythonshorts #orderofoperations #pythonarithmetic
https://www.youtube.com/watch?v=RfHA446_hFA
The following #Python code will be displayed in an upcoming #YouTube 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 https://www.youtube.com/@novaTopFlex.
@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 #python and #chromaDB for a local Ollama instance, i use langchain, langchain_ollama, langchain_chroma
The following #operatingsystems are recognized in `sys.platform` in the #Python programming language:
#AIX → "aix"
#Android → "android" ("linux" prior to Python 3.13)
#Emscripten (compiler) → "emscripten"
#iOS → "ios"
#Linux → "linux"
#macOS → "darwin"
#Windows → "win32"
#Cygwin → "cygwin"
#WASI → "wasi"
To test for #macOS with the #Python interpreter, the following code is correct:
if sys.platform == "darwin":
print(True)
else:
print(False)