Latest questions in Python

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
209 views
+1 vote
1 answer

Unzipping files in Python

Use this code: import zipfile with zipfile.ZipFile(path_to_zip_file, 'r') as ...READ MORE

Apr 25, 2022 in Python by narikkadan
• 63,420 points
356 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
650 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,030 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,331 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
330 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
990 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
299 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
776 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
574 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
425 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
779 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,711 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
315 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

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

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,510 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 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
308 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,360 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
293 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

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,186 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

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,433 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

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

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,118 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

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
471 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

'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

Python: % operator in print() statement

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

Apr 18, 2022 in Python by Edureka
• 13,620 points
422 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
173 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
665 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
166 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,008 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

'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
988 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

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

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
886 views
0 votes
1 answer

Are Python sets mutable?

>>>> x = set([4, 5, 6]) Sets are ...READ MORE

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

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

The .title() method of a string (either ASCII or ...READ MORE

Feb 18, 2022 in Python by CoolCoder
• 4,400 points
323 views
0 votes
0 answers

Is there a difference between "==" and "is"?

In Python, are the following two tests ...READ MORE

Feb 18, 2022 in Python by Dev
• 6,000 points
229 views
0 votes
0 answers

How to return dictionary keys as a list in Python?

Now, in Python >= 3.3, I get something ...READ MORE

Feb 18, 2022 in Python by Dev
• 6,000 points
256 views
0 votes
0 answers

Why dict.get(key) instead of dict[key]?

Today, I came across the dict method get which, given a ...READ MORE

Feb 18, 2022 in Python by Dev
• 6,000 points
225 views
0 votes
0 answers

How to use string.replace() in python 3.x

The string.replace() is deprecated on python 3.x. ...READ MORE

Feb 18, 2022 in Python by Dev
• 6,000 points
246 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
0 votes
0 answers

raw_input function in Python

What is the raw_input function? Is it ...READ MORE

Feb 17, 2022 in Python by surbhi
• 3,810 points
207 views