Skip to main content
11 votes
3 answers
412 views

Consider the following executable Python script mtmp.py: import numpy as np import os from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor # `x` is referenced `n_loop` times. def ...
user2961927's user avatar
  • 1,922
Advice
0 votes
12 replies
137 views

I am trying to create a 3 x 3 kind of matrix where I create 3 lists and append 3 random values to it so that when I print the 3 lists, it looks like a 3 x 3 matrix of random numbers. import random ...
kirtyakshay's user avatar
Advice
0 votes
7 replies
142 views

Just started a week or 2 ago with Python, no rigid schedule just practicing leniently and I finally made a calculator which converts one unit to the other in the metric system. If there is any ...
user32074304's user avatar
Advice
1 vote
6 replies
145 views

I'm a newbie to Python.I am currently completing one of my assignments. I'm currently learning about classe, but I'm quite confused. Don't classe just do some sort of classification? Why is it said ...
Yanbing's user avatar
Advice
0 votes
8 replies
183 views

Let's say I have a dictionary such as: dict = { "Mars": [4, 3, 4, 7, 10], "Jupiter": [6, 6, 7, 9, 11], "Saturn": [4, 5, 12, 22, 1]} I would like to iterate through each ...
triedandtested's user avatar
Advice
1 vote
7 replies
202 views

I am someone who likes to study via online notes and documentation, but I would really like it if there were a website with a collection of short notes and/or cheat sheets so that I can revise the ...
Jethasri's user avatar
Advice
2 votes
6 replies
152 views

After learning Python for a while, I feel that () is a standard for starting functions. If I don't add () after the function, the function won't run even if it doesn't have parameter imports, so I ...
Yanbing's user avatar
5 votes
3 answers
247 views

How can I query columns that are lists or dicts? Here is some basic JSON-like data. [ { "id": 1, "name": "John Doe", "age": 30, &...
LayneSadler's user avatar
  • 6,161
2 votes
1 answer
1k views

I recently (as of November 2025) had some working SQL via pyODBC to import an existing CSV file to a table in an Access database. cursor.execute(f""" INSERT INTO [{table_name}] ([Date], ...
maptuv's user avatar
  • 25
2 votes
1 answer
2k views

I am trying to use the Google Gemini API with langchain-google-genai in Python. I want to use the Free Tier, so I created a fresh project in Google AI Studio (without linking any billing account). ...
skullXcalibre's user avatar
Tooling
0 votes
5 replies
134 views

I am a newbie in Python. My assignment requires me to use a graphical interface, and I plan to use tkinter for this purpose. However, I find manually typing code too complicated. Could any expert ...
Yanbing's user avatar
3 votes
2 answers
144 views

I am using the videos.list endpoint of the YouTube Data API v3 to request information about multiple YouTube videos at once. The documentation states the id parameter "specifies a comma-separated ...
Stevoisiak's user avatar
  • 27.9k
4 votes
2 answers
171 views

I have found the answer :-) It is: ^ghf(0[0-9]|[1-4][0-9]|5[0-2])\d{3}[A-Z]{2}_v\d{2}.pdf$ I receive filenames from a client that are structured according to the following scheme: ghf50001BE_v02.pdf ...
Thorsten D's user avatar
Best practices
0 votes
12 replies
207 views

I find it difficult to code (in python) without ChatGPT sometimes - and I'm not great at using documentations and learning, i feel like chatGPT explains things better. Could you guide me as I aspire ...
vii12345's user avatar
Advice
0 votes
4 replies
168 views

hours = input("Enter hours: ") try: hours = float(hours) except: print('Please enter a valid number') quit() rate = input("Enter rate: ") try: rate = float(rate) ...
Baba's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
37