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
309 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
230 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
229 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
550 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
344 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
487 views
0 votes
0 answers

Is it possible to decorate classes?

Apr 24, 2022 in Python by Kichu
• 19,050 points
228 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
222 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
214 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
266 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
432 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
213 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
193 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
40,104 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
254 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
208 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
180 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,514 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,755 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,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
173 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,171 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,204 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,117 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,521 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,589 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,583 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
1,024 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
24,017 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,588 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,528 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,455 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,131 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
917 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,371 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,124 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,271 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,251 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,403 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,317 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,776 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
581 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
808 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
857 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,017 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
608 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
541 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,062 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
589 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
480 views