Trending questions in Python

0 votes
0 answers

How can I download Anaconda for python 3.6

I am working on a  Tensorflow object ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,050 points
293 views
0 votes
0 answers

What does the "yield" keyword do?

What is the use of the yield ...READ MORE

Apr 26, 2022 in Python by Edureka
• 13,620 points
214 views
0 votes
0 answers

Function for factorial in Python

How do I go about computing a ...READ MORE

Apr 26, 2022 in Python by Edureka
• 13,620 points
212 views
0 votes
0 answers

'python' is not recognized as an internal or external command

So I have recently installed Python Version ...READ MORE

Apr 18, 2022 in Python by Edureka
• 13,620 points
538 views
0 votes
0 answers

Avoiding the case sensitivity in python

I need to make the code below ...READ MORE

Apr 22, 2022 in Python by Edureka
• 13,620 points
328 views
0 votes
0 answers

JSON parsing in python using JSONPath

In the JSON below, I want to ...READ MORE

Apr 19, 2022 in Python by Edureka
• 13,620 points
470 views
0 votes
0 answers

Is it possible to decorate classes?

Apr 24, 2022 in Python by Kichu
• 19,050 points
220 views
0 votes
0 answers

How do I execute a program or call a system command?

How do I call an external command ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,050 points
216 views
0 votes
0 answers

How to terminate a script?

How to terminate a script in python? READ MORE

Apr 24, 2022 in Python by Kichu
• 19,050 points
187 views
0 votes
0 answers

Use and meaning of "in" in an if statement?

In an example from Zed Shaw's Learn Python ...READ MORE

Apr 22, 2022 in Python by Edureka
• 13,620 points
249 views
0 votes
0 answers

Python: % operator in print() statement

I just came across this Python code, ...READ MORE

Apr 18, 2022 in Python by Edureka
• 13,620 points
421 views
0 votes
0 answers

Replacements for switch statement in Python?

I want to write a function in ...READ MORE

Apr 22, 2022 in Python by Edureka
• 13,620 points
208 views
0 votes
0 answers

Does "IndexError: list index out of range" when trying to access the N'th item mean that my list has less than N items?

I'm telling my program to print out ...READ MORE

Apr 22, 2022 in Python by Edureka
• 13,620 points
186 views
0 votes
0 answers

Does Python have a ternary conditional operator?

If Python doesn't have a ternary conditional operator, ...READ MORE

Apr 19, 2022 in Python by Edureka
• 13,620 points
232 views
0 votes
0 answers

How to use the pass statement

What would be a simple/basic situation where ...READ MORE

Apr 19, 2022 in Python by Edureka
• 13,620 points
195 views
0 votes
0 answers

Base language of Python

What is the base language Python is ...READ MORE

Apr 18, 2022 in Python by Edureka
• 13,620 points
172 views
+1 vote
3 answers

ModuleNotFoundError: No module named 'speech_recognition' Not able to install speech_recognition in python:

Hey. You have to use SpeechRecognition as module ...READ MORE

Nov 28, 2018 in Python by Omkar
• 69,210 points
39,891 views
0 votes
1 answer

Sum a list of numbers in Python

So you want (element 0 + element ...READ MORE

Feb 14, 2022 in Python by CoolCoder
• 4,400 points
2,672 views
0 votes
0 answers

Python functions within lists

So I inquired about utilising a function ...READ MORE

Apr 12, 2022 in Python by Edureka
• 12,690 points
165 views
+2 votes
2 answers

ModuleNotFoundError: No module named 'pyttsx3

Hi@akhtar, To avoid this error you have to ...READ MORE

Apr 24, 2020 in Python by MD
• 95,440 points
27,308 views
0 votes
1 answer

Django object is not JSON serializable

Hello @kartik, simplejson and json don't work with django objects well. Django's ...READ MORE

Aug 7, 2020 in Python by Niroj
• 82,880 points
26,549 views
0 votes
1 answer

DataFrame constructor not properly called! error

You are providing a string representation of ...READ MORE

Feb 22, 2022 in Python by Aditya
• 7,680 points
2,122 views
0 votes
1 answer

modulenotfounderror: no module named 'cv2'

Firstly, please do run these following commands ...READ MORE

Feb 8, 2022 in Python by Soham
• 9,700 points
2,151 views
0 votes
1 answer

What is the output of the following python code snippet?

for i in range(0, 10, 2):     if ...READ MORE

Feb 9, 2022 in Python by Nandini
• 5,480 points
2,085 views
0 votes
1 answer

Automatically create requirements.txt

You can use the following code to ...READ MORE

Feb 22, 2022 in Python by Aditya
• 7,680 points
1,505 views
0 votes
1 answer

Sum a list of numbers in Python

Let us take a list of Numbers ...READ MORE

Feb 14, 2022 in Python by Nandini
• 5,480 points
1,551 views
0 votes
1 answer

TypeError: a bytes-like object is required, not 'str' when writing to a file in Python3

After what I observed, you would have ...READ MORE

Feb 11, 2022 in Python by Rahul
• 9,670 points
1,559 views
0 votes
1 answer

'str' object does not support item assignment

In Python, strings are not very mutable ...READ MORE

Feb 22, 2022 in Python by Aditya
• 7,680 points
987 views
+1 vote
2 answers

ModuleNotFoundError: No module named 'selenium'

i fix the problem after installing go ...READ MORE

Nov 18, 2020 in Python by ahmed
23,951 views
0 votes
1 answer

'pip' is not recognized as an internal or external command, operable program or batch file.

You will have to add the path ...READ MORE

Feb 8, 2022 in Python by Soham
• 9,700 points
1,557 views
0 votes
1 answer

"inconsistent use of tabs and spaces in indentation"

To answer your question, start with eliminating ...READ MORE

Feb 10, 2022 in Python by Rahul
• 9,670 points
1,440 views
0 votes
1 answer

ImportError: No module named pandas

 I just had the problem and I ...READ MORE

Feb 17, 2022 in Python by Aditya
• 7,680 points
1,117 views
–1 vote
2 answers

In Python, How do I read 2 CSV files, compare column 1 from both, and then write to a new file where the Column 1s match?

Hi @Mike. First, read both the csv ...READ MORE

Jul 24, 2019 in Python by Omkar
• 69,210 points
32,426 views
0 votes
1 answer

Calculating arithmetic mean (one type of average) in Python

There are ways to calculate mean in ...READ MORE

Feb 21, 2022 in Python by Dev
• 6,000 points
884 views
0 votes
1 answer

What is the difference between tree depth and height?

To answer your question, you will have ...READ MORE

Feb 9, 2022 in Python by Rahul
• 9,670 points
1,328 views
0 votes
1 answer

Remove all special characters, punctuation and spaces from string

This can be done without regex: >>> string ...READ MORE

Feb 14, 2022 in Python by CoolCoder
• 4,400 points
1,105 views
0 votes
1 answer

Purpose of "%matplotlib inline"

The %matplotlib inline is nothing but a ...READ MORE

Feb 10, 2022 in Python by Rahul
• 9,670 points
1,220 views
0 votes
1 answer

How to scrape time-series chart data from poocoin.app with Python?

In order to ensure it works, one ...READ MORE

Feb 8, 2022 in Python by Rahul
• 9,670 points
1,286 views
0 votes
3 answers

Python error "NameError: name 'sr' is not defined"

NameError: name 'xx' is not defined Python knows ...READ MORE

Mar 19, 2020 in Python by rahul
• 360 points
41,287 views
0 votes
1 answer

Exception in Tkinter callback Traceback (most recent call last):

Hello, @R, As per the Beautiful Soup Documentation: AttributeError: 'NoneType' ...READ MORE

Dec 21, 2020 in Python by Gitika
• 65,910 points
19,104 views
0 votes
1 answer

How to check Django version

The Django 1.5 supports the Python 2.6.5 ...READ MORE

Feb 22, 2022 in Python by Aditya
• 7,680 points
532 views
0 votes
1 answer

'python' is not recognized as an internal or external command

Use "py" instead of "python" from command ...READ MORE

Feb 16, 2022 in Python by CoolCoder
• 4,400 points
782 views
0 votes
1 answer

How can I get list of values from dict?

Here is an example to get the ...READ MORE

Feb 14, 2022 in Python by Nandini
• 5,480 points
822 views
0 votes
1 answer

How to do a not equal in Django queryset filtering?

Hello @kartik, Your query appears to have a ...READ MORE

Jun 26, 2020 in Python by Niroj
• 82,880 points
26,638 views
0 votes
1 answer

invalid literal for int() with base 10

In order to solve this problem, one ...READ MORE

Feb 8, 2022 in Python by Soham
• 9,700 points
1,005 views
0 votes
1 answer

syntaxerror: "unexpected character after line continuation character in python" math

There is a slight confusion as both ...READ MORE

Feb 16, 2022 in Python by Nandini
• 5,480 points
593 views
0 votes
1 answer

Are Python sets mutable?

Python sets are data structures which are ...READ MORE

Feb 17, 2022 in Python by Dev
• 6,000 points
523 views
0 votes
1 answer

python: Syntax Error: EOL while scanning string literal

There are many ways to deal with ...READ MORE

Feb 5, 2022 in Python by Dev
• 6,000 points
1,042 views
0 votes
1 answer

Reverse a string in Python

>>> 'hello world'[::-1] 'dlrow olleh' This is extended slice syntax. It ...READ MORE

Feb 15, 2022 in Python by CoolCoder
• 4,400 points
577 views
0 votes
1 answer

How can I capitalize the first letter of each word in a string?

By using  the .title() method of string ...READ MORE

Feb 17, 2022 in Python by Dev
• 6,000 points
468 views