Most viewed questions in Python

0 votes
0 answers

I am trying to execute a python code

def __init__(self, mode=False, maxHands=2, detectionCon=0.5, trackCon=0.5):        ^ IndentationError: ...READ MORE

May 13, 2021 in Python by 9A 43

edited Mar 4 142 views
0 votes
0 answers

IndentationError: expected an indented block

I am a beginner and this my ...READ MORE

May 6, 2021 in Python by anonymous

edited Mar 4 142 views
0 votes
0 answers

how to install PyAudio???

hi, I'm working on a project and ...READ MORE

Mar 18, 2021 in Python by Modern

edited Mar 4 142 views
0 votes
0 answers
0 votes
0 answers

Why can't I use Screen from turtle module ?

TypeError: '_Screen' object is not callable READ MORE

May 9, 2021 in Python by anonymous

edited Mar 4 141 views
0 votes
0 answers

How do I create multiline comments in Python?

How do I make multi-line comments? Most ...READ MORE

Jan 5, 2023 in Python by erzan
• 630 points

edited Mar 4 140 views
0 votes
0 answers

IndentationError: expected an indented block

this is my code  stemming = PorterStemmer() corpus = ...READ MORE

Jun 8, 2022 in Python by anonymous

edited Mar 4 140 views
0 votes
0 answers

how can I make this code without built in function(sort,sorted) ?

class KeyIndex:     def __init__(self, a):         self.k = a     def search(self, ...READ MORE

May 11, 2021 in Python by anonymous

edited Mar 4 140 views
0 votes
0 answers

How do you check if the current user is the same as a foreign key in a model?

I have a model called Tribe which ...READ MORE

Jan 26, 2021 in Python by Andrija

edited Mar 4 140 views
0 votes
0 answers

How can i dynamically mapp models id's in django

ysql> select * from exampleapp_author; +------+-------------------------+---------------+ | id    ...READ MORE

Jan 16, 2021 in Python by anonymous

edited Mar 4 140 views
0 votes
0 answers

File "<ipython-input-30-eae839ba8312>", line 11 d=dist(queryPoint,X[i]) ^ IndentationError: expected an indented block

for i in range(m):     d=dist(queryPoint,X[i]) &nb ...READ MORE

Jan 15, 2021 in Python by anonymous

edited Mar 4 140 views
0 votes
0 answers

How to highlight cell value in dataframe that exceeds mean of its column

I have a df with where I ...READ MORE

Jun 10, 2022 in Python by Pavan

edited Mar 4 139 views
0 votes
0 answers

why do we hide data to user in python

in data abstraction, oops concept READ MORE

Jan 28, 2022 in Python by AHMED

edited Mar 4 139 views
0 votes
0 answers

How to save a file to particular folder using selenium webdriver Chrome?

I'm using selenium webdriver for chrome. My ...READ MORE

Apr 6, 2021 in Python by Pushpa

edited Mar 4 139 views
0 votes
0 answers

List vs tuple, when to use each?

In Python, when should you use lists ...READ MORE

Mar 15, 2023 in Python by Arya
• 990 points

edited Mar 5 138 views
0 votes
0 answers

I am trying to execute the following python code

import logging import os  import time  def method(arg): from django.conf ...READ MORE

Feb 3, 2023 in Python by anonymous

edited Mar 4 138 views
0 votes
0 answers

Filter data in django before expired date

I want to show and filter  data ...READ MORE

Jul 5, 2022 in Python by Ide

edited Mar 4 138 views
0 votes
0 answers

Find the syntax error in the code given:

Find the syntax error in the code ...READ MORE

Mar 16, 2022 in Python by Dharshinii

edited Mar 4 138 views
0 votes
0 answers

how to fix this error in python ;ModuleNotFoundError: No module named 'download'?

hello i am a beginner in machine ...READ MORE

Feb 2, 2021 in Python by anonymous

edited Mar 4 138 views
0 votes
0 answers

What do the python file extensions, .pyc .pyd .pyo stand for?

What do these python file extensions mean? .pyc .pyd .pyo What ...READ MORE

Mar 15, 2023 in Python by anonymous
• 990 points

edited Mar 5 137 views
0 votes
0 answers

If I have multilabel admin register through API in Django, how do I show the users of each admin?

I'm using DRF for make API , ...READ MORE

Nov 28, 2022 in Python by Mohamed

edited Mar 4 135 views
0 votes
0 answers

solve syntax error

self.var_name= StringVar()                  ^ SyntaxError: invalid syntax how to solve the ...READ MORE

Oct 10, 2022 in Python by anonymous

edited Mar 4 135 views
0 votes
0 answers

lmList, bbox = detector.findPosition(img) ValueError: not enough values to unpack (expected 2, got 0)

can anyone please help me, tried those ...READ MORE

Jun 22, 2022 in Python by Webinar

edited Mar 4 135 views
0 votes
0 answers

ValueError: Found input variables with inconsistent numbers of samples: [40002, 1573]

hi I want to try to classify ...READ MORE

Oct 16, 2022 in Python by anonymous

edited Mar 4 134 views
0 votes
0 answers

Im confused about this error in python

When i type this def books_available(books):     """Show ...READ MORE

Jun 17, 2021 in Python by robert

edited Mar 4 134 views
0 votes
0 answers

Get index of a list from dataframe

Hi, this is my dataframe. Name Age 0 Mike ...READ MORE

May 22, 2021 in Python by anonymous

edited Mar 4 134 views
0 votes
0 answers

python please help, I'm getting max_X not defined

from sklearn.model_selection import cross_val_score max_k = 100 cv_scores = ...READ MORE

Mar 22, 2021 in Python by anonymous

edited Mar 4 134 views
0 votes
0 answers

cannot connect to Visual code thru Python, getting 500 error code

500 Sorry, something went wrong on our system. ...READ MORE

May 19, 2021 in Python by Kailash

edited Mar 4 132 views
0 votes
0 answers

what is this doing?

READ MORE

Jan 26, 2021 in Python by patrick

edited Mar 4 132 views
0 votes
0 answers

I executed this code. But its showing me error. Could anyone fix it?

READ MORE

Jun 25, 2022 in Python by anonymous

edited Mar 4 131 views
0 votes
0 answers

many websites show output code is accessed without print() how can i do that

list_x =[1,2,34] list_x READ MORE

Feb 13, 2021 in Python by mahirz

edited Mar 4 131 views
0 votes
0 answers

Python doesn't see variables are equal

i=3 def pw(): global i ...READ MORE

Feb 17, 2022 in Python by anonymous

edited Mar 4 130 views
0 votes
0 answers

how to make the output stop outputting when it is a precise rgb number?

I am a beginner using python so ...READ MORE

Dec 6, 2022 in Python by anonymous

edited Mar 4 128 views
0 votes
0 answers

MYSQL CONNECTOR ISSUE

I AM TRYING TO CONNECT MYSQL(8.0) AND ...READ MORE

Jun 19, 2021 in Python by anonymous

edited Mar 4 128 views
0 votes
0 answers

please help with this

I need the user to type 17 ...READ MORE

Sep 25, 2022 in Python by bonicoder

edited Mar 4 127 views
0 votes
0 answers

Testcase getting failed

def test_upload_file(client, tmp_path, set_mock_decrypty):     """     ...READ MORE

Apr 14, 2022 in Python by anonymous

edited Mar 4 124 views
0 votes
0 answers

IndentationError: expected an indented block, while executing elbow method

K = range(1,10) sum_sq_dst = [] for k in ...READ MORE

Sep 1, 2021 in Python by Edureka

edited Mar 4 118 views
0 votes
0 answers

MQTT subscribe message

Hello, this is my code where i ...READ MORE

Dec 9, 2021 in Python by Shiri

edited Mar 4 106 views