[Solved] i want to scrape this part

This data is taken from additional request to https://www.seloger.com/detail,json,caracteristique_bien.json?idannonce=142632059. There you will get json with whole information. UPD: url_id = re.search(r’/(\d+)\.htm’, response.url).group(1) details_url=”https://www.seloger.com/detail,json,caracteristique_bien.json?idannonce={}” # make request to url yield Request(details_url.format(url_id)) 5 solved i want to scrape this part

[Solved] Solving an equation with python

You can do things like this with the sympy library. http://docs.sympy.org/dev/index.html >>> from sympy import * >>> from sympy.solvers import solve >>> ca, ra = symbols(“ca ra”) >>> eq = -ra + (1.5 * (ca – (ra/2))/(1 + 0.8 * (ca – (ra/2)))) >>> print(eq) -ra + (1.5*ca – 0.75*ra)/(0.8*ca – 0.4*ra + 1) >>> … Read more

[Solved] My program keeps getting an error called ‘inconsistent use of tabs and spaces’ when I add an else or elif statement [duplicate]

you have an indentation problem : if (input(“”).lower() == “yes”): gender_set() elif name.lower()==”dev mode”: print(“dev mode activated”) gender_set() else: name_set() solved My program keeps getting an error called ‘inconsistent use of tabs and spaces’ when I add an else or elif statement [duplicate]

[Solved] Matrix, how to solve? [closed]

import random n = int(input(‘Введите кол-во столбцов матрицы: ‘)) #columns m = int(input(‘Введите кол-во строк матрицы: ‘)) #rows matrix = [[random.randrange(0, 10) for y in range(n)] for x in range(m)] for i in range(m): for j in range(n): print(matrix[i][j], end = ” “) print() max_x = 0 for i in range(m): for j in range(n): … Read more

[Solved] JOINning two List-of-Lists to one [closed]

Just use Pandas to convert your lists (income and Expenses) into Dataframes, merge them (in this case it’s basically an inner join on Year and Month) and then convert the Dataframe you get into a list of lists. df1 = pd.DataFrame(income, columns=[“Year”, “Month”, “X”]) df2 = pd.DataFrame(Expenses, columns=[“Year”, “Month”, “Y”]) joined = df1.merge(df2, on=[“Year”, “Month”]).values.tolist() … Read more

[Solved] How to fix ‘\n’ from json?

Assuming your data object is a simple dict or list,all you need to do is: with open(output_path, ‘w’) as f: json.dump(data, f, sort_keys=True, indent=4) This will correctly dump to the output file. 3 solved How to fix ‘\n’ from json?

[Solved] combining two json strings without ” or ‘

You shouldn’t try to manipulate them as strings – this will be fragile and very specific to the strings. Instead, parse the strings into dictionaries, do whatever manipulations you want, and then dump them back to JSON strings: import json s1 = ‘{“step”:”example step”, “data”:”example data”, “result”:”example result”}’ s2 = ‘{“attachments”:[ { “data”:”gsddfgdsfg…(base64) “, “filename”:”example1.txt”, … Read more

[Solved] What is the process of this program written in Python?

It seems you are new to the world of programming. “sys.argv” is used to take Command Line Arguments. when you run as “python sample.py”, the variable sys.argv will be a single element list i.e. [“sample.py”] len(sys.argv) is 1 in this case The Expected Working of the program is: when you run as “python sample.py fileToRead.txt”, … Read more

[Solved] How do I put this into one line? [closed]

This can be put into one line in several ways. Without changing your code you could just remove the newline and indent: with open(‘output.txt’, ‘w’) as f: for item in winapps.list_installed(): print(item, file=f) Or just using unpacking and print formatting: with open(‘output.txt’, ‘w’) as f: print(*winapps.list_installed(), sep=”\n”, file=f) Which can also be done in one … Read more