Skip to content
Advertisement

BeautifulSoup choosing a line from output

I try to make a python script that gets the dam occupancy rates from a website. Here is the code: The output is like this: Genel Doluluk Oranı means occupancy rate. I need the value of occupancy rate which writes in next line like 29,48. How can I get this value from output? Answer Cause question and expected result is

Why does Python not read the next line (if)?

I wrote the program about Pythagorean I got my answer but python doesn’t read (break) after (if) . My program title : (Special Pythagorean triplet), there is a one answer exist for ((a+b+c=1000)&(a**2 + b**2 =c**2) ) I want find abc . I know (a=200, b=375, c=425) but when program starts it never stop and it continue. It also types

Python filter from Excel

I am working on to create a python automation program for Excel. I wanted to divide the longitude based on the median number. What I want to get data is : Below is my code: Below is the output from this code. output above the output is show all longitude in United States. However, I want to filter only 1.

ActionChain click() returning Web Element instead of clicking

I was wondering how to simulate a button click on a login page using Selenium. When I try the following, it gives me an error saying that the button is not clickable at the coordinates listed (635, 353). When I try using an ActionChain, it returns the Web Element (the button that’s supposed to be clicked) rather click. Answer I

Nested if statement returns no such item

my scipt is working as in searching for zip files, unzip and do the things i want. But problem arise when i have nested zip files inside the zip file, so i thought maybe i copy the working if statement, make a few adjustments but i still cant get it to work. what i want to achieve is to simply

Python: Get randomised mode from list of lists

When I use this function to calculate the randomised mode from a normal list it works fine. However I need to get the randomised mode from a list of lists and this function below only returns the last number in matrix even though it is not the mode. How would i solve this issue? Note: I am only allowed one

Discord.py ping command doesn’t work in a cog

My ping command doesn’t work in a cog but works in my main.py file. Here’s the code for the cog: When I run the ping command I get this error: Answer Simple solution, you added bot to your class object Misc as self.bot so when referring to bot.latency in that context you should actually be using self.bot.latency.

Advertisement