Most voted questions in Python

0 votes
1 answer

Is Python strongly typed?

Python is both strongly and dynamically typed. Strongly ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
715 views
0 votes
1 answer

How to fix error "ERROR: Command errored out with exit status 1: python." when trying to install django-heroku using pip

Just add the package containing the executable pg_config. ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
7,094 views
0 votes
1 answer

Python pip on Windows - command "cl.exe" failed

You should have  cl.exe (the Microsoft C Compiler) installed ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
3,558 views
0 votes
1 answer

EOFError: EOF when reading a line

The code: width, height = map(int, input().split()) def rectanglePerimeter(width, ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
4,312 views
0 votes
1 answer

What is the difference between read() and readline() in python?

The read() will read the whole file at ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
15,098 views
0 votes
1 answer

Python: Could not install packages due to an OSError: [Errno 2] No such file or directory

I also met with the same problem ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
35,267 views
0 votes
1 answer

ValueError: could not convert string to float: id

The problem is that in your code ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
8,310 views
0 votes
1 answer

Plot correlation matrix using pandas

Just use pyplot.matshow() from matplotlib: import matplotlib.pyplot as plt plt.matshow(dataframe.corr()) plt.show() If df.corr() ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
1,765 views
0 votes
1 answer

How to urlencode a querystring in Python?

Just pass your parameters into urlencode() like: >>> import urllib >>> ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
430 views
0 votes
1 answer

How do I upgrade the Python installation in Windows 10?

If you have 2.x or 3.x version ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
229 views
0 votes
1 answer

Spell Checker for Python

This function, in particular, has the ideas ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
665 views
0 votes
1 answer

Detect and exclude outliers in a pandas DataFrame

Function definition. This handles data when non-numeric attributes ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,420 points
3,134 views
0 votes
0 answers

Python shopping cart add to cart, get total get num items

I want to loop through the list ...READ MORE

Apr 25, 2022 in Python by Kichu
• 19,050 points
22,467 views
0 votes
0 answers

Print series of prime numbers in python

I want to print a series of ...READ MORE

Apr 25, 2022 in Python by Kichu
• 19,050 points
345 views
0 votes
1 answer

Simple prime number generator in Python

There are some problems with your code. You ...READ MORE

Apr 25, 2022 in Python by narikkadan
• 63,420 points
1,025 views
0 votes
1 answer

Parse date string and change format

Use datetime module. it can help you change the ...READ MORE

Apr 25, 2022 in Python by narikkadan
• 63,420 points
317 views
0 votes
1 answer

ln (Natural Log) in Python

Use math.log it is a natural logarithm. For ...READ MORE

Apr 25, 2022 in Python by narikkadan
• 63,420 points
800 views
0 votes
1 answer

Programmatically generate video or animated GIF in Python?

You can use  ImageMagick. Save your frames ...READ MORE

Apr 25, 2022 in Python by narikkadan
• 63,420 points
640 views
0 votes
0 answers

Print multiple arguments in Python

This is my code: print("Total score for %s ...READ MORE

Apr 25, 2022 in Python by Kichu
• 19,050 points
454 views
0 votes
0 answers

Why does "pip install" inside Python raise a SyntaxError?

I wanted to use pip to install ...READ MORE

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

Python 3 ImportError: No module named 'ConfigParser'

I want to pip - install the ...READ MORE

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

Why do I get "List index out of range" when trying to add consecutive numbers in a list using "for i in list"?

Given the following list a = [0, 1, ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,050 points
334 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
217 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
232 views
0 votes
0 answers

Double the value of array on a match - Python

I want to iterate through the elements ...READ MORE

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

Is it possible to decorate classes?

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

How to know which Python is running in Jupyter notebook?

I am using jupyter notebook and I ...READ MORE

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

How do I use matplotlib autopct?

I want to create a matplotlib pie ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,050 points
1,385 views
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
310 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
196 views
0 votes
0 answers

Python Requests get returns response code 401 for nse india website

I use this program to get the ...READ MORE

Apr 22, 2022 in Python by Edureka
• 13,620 points
1,221 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
274 views
0 votes
0 answers

How to install pywhatkit in python?

if I am going to install pywhatkit ...READ MORE

Apr 22, 2022 in Python by Edureka
• 13,620 points
1,462 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
349 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
217 views
0 votes
0 answers

Automate logging in to MS form using Python

I have to login into the same ...READ MORE

Apr 22, 2022 in Python by Edureka
• 13,620 points
1,162 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
262 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
491 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
210 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
558 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
434 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
181 views
0 votes
0 answers

Open Whatsapp Windows app directly from python program using url

According to this FAQ page of Whatsapp on How to ...READ MORE

Apr 18, 2022 in Python by Edureka
• 13,620 points
711 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
175 views
0 votes
1 answer

Unsupported operand type(s) for +: 'int' and 'str'

You seem to be trying to train ...READ MORE

Feb 23, 2022 in Python by Aditya
• 7,680 points
3,064 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,184 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,037 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,525 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
592 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
925 views