Most voted questions in Python

0 votes
1 answer

Command 'pip' not found

Seems like python is installed in your ...READ MORE

Jan 30, 2019 in Python by Omkar
• 69,230 points
6,168 views
0 votes
1 answer

How to use an index to get an item?

What you show, ('A','B','C','D','E'), is not a ...READ MORE

Jan 30, 2019 in Python by SDeb
• 13,300 points
397 views
0 votes
1 answer

Shuffling a Word

You can try the following: import random word = ...READ MORE

Jan 30, 2019 in Python by SDeb
• 13,300 points
819 views
0 votes
1 answer

How can I have only positive decimal numbers in Django using Python?

Hi, are you aware of something called ...READ MORE

Jan 30, 2019 in Python by Nymeria
• 3,560 points
5,914 views
0 votes
1 answer

How do I obtain the index list in a NumPy Array of all the NaN values present using Python?

Hi, it is pretty simple, to be ...READ MORE

Jan 30, 2019 in Python by Nymeria
• 3,560 points
16,859 views
0 votes
1 answer

How to find if setuptools is installed in python?

You can use python interpreter to check ...READ MORE

Jan 29, 2019 in Python by Omkar
• 69,230 points
1,736 views
0 votes
1 answer

How to find packages installed using pip?

Yes, you can find the packages installed ...READ MORE

Jan 29, 2019 in Python by Omkar
• 69,230 points
486 views
0 votes
1 answer

How to upgrade all packages using pip at once?

pip doesn’t have a default command for ...READ MORE

Jan 29, 2019 in Python by Omkar
• 69,230 points
1,262 views
0 votes
1 answer

socket.shutdown vs socket.close

Once a socket is no longer required, ...READ MORE

Jan 29, 2019 in Python by SDeb
• 13,300 points
2,979 views
0 votes
1 answer

How to create a GUID/UUID in Python

The uuid module, in Python 2.5 and ...READ MORE

Jan 29, 2019 in Python by SDeb
• 13,300 points
1,558 views
0 votes
1 answer

How do I check which files are open or closed in Python?

Hi, good question. I have a solution ...READ MORE

Jan 29, 2019 in Python by Nymeria
• 3,560 points
2,130 views
0 votes
1 answer

How to create and read from a temporary file in Python?

Hi, there is a very simple solution ...READ MORE

Jan 29, 2019 in Python by Nymeria
• 3,560 points
1,823 views
0 votes
1 answer

Python Linked List

Check out the following code. This might ...READ MORE

Jan 29, 2019 in Python by SDeb
• 13,300 points
465 views
0 votes
1 answer

Python if not == vs if !=

Using dis to look at the bytecode ...READ MORE

Jan 29, 2019 in Python by SDeb
• 13,300 points
787 views
0 votes
1 answer

Pyplot error "only size-1 arrays can be converted to Python scalars"

You can plot the chart by taking ...READ MORE

Jan 28, 2019 in Python by Omkar
• 69,230 points
9,188 views
0 votes
1 answer

Python logical operator 'and'

If you use and on two or ...READ MORE

Jan 28, 2019 in Python by Omkar
• 69,230 points
517 views
0 votes
1 answer

Need help with Django URL string parameter pattern in Python

Good question. The solution to this short ...READ MORE

Jan 28, 2019 in Python by Nymeria
• 3,560 points
626 views
0 votes
1 answer

Need help displaying complete output in Jupyter rather than just last result set in Python

Hi, the solution to this is very ...READ MORE

Jan 28, 2019 in Python by Nymeria
• 3,560 points
974 views
0 votes
1 answer

error while installing pyautoit

Hi @reddy!  According to the Python Documentation, Error code ...READ MORE

Jan 27, 2019 in Python by Omkar
• 69,230 points
1,471 views
0 votes
1 answer

Confusion in Python Pandas code

I have added the explanation of code ...READ MORE

Jan 26, 2019 in Python by Omkar
• 69,230 points
1,515 views
0 votes
1 answer

Need help referencing Python Package when the filename consists of a period key

Hi, it's a very simple answer actually.  You ...READ MORE

Jan 25, 2019 in Python by Nymeria
• 3,560 points
741 views
0 votes
1 answer

How to get rid of tensorflow verbose messages with Keras?

If you are using TensorFlow 0.12, you ...READ MORE

Jan 24, 2019 in Python by SDeb
• 13,300 points
4,327 views
0 votes
1 answer

No module named urllib3

It is possible that either urllib3 is ...READ MORE

Jan 24, 2019 in Python by SDeb
• 13,300 points
8,579 views
0 votes
1 answer

Need help using Joins in Pandas using Python

Hi, there is one scenario where the ...READ MORE

Jan 24, 2019 in Python by Nymeria
• 3,560 points
457 views
0 votes
1 answer

Need help with making use of Pluck in Python

Hi, good question. Easy solution to be ...READ MORE

Jan 24, 2019 in Python by Nymeria
• 3,560 points
1,473 views
0 votes
1 answer

How can I differentiate between column vectors and row vectors using Python?

Hi, good question. What you can do ...READ MORE

Jan 23, 2019 in Python by Nymeria
• 3,560 points
1,826 views
0 votes
1 answer

I am using a built-in function name as a method identifier and sometimes as an attribute in Python, is this bad?

Hi, good question. The thing is that ...READ MORE

Jan 23, 2019 in Python by Nymeria
• 3,560 points
574 views
0 votes
1 answer

Problem with module xlsxwriter

Even if it looks like the module ...READ MORE

Jan 23, 2019 in Python by charlie_brown
• 7,720 points
3,281 views
0 votes
2 answers

Python UnboundLocalError error while executing script

Inside your function when you say word=word+1, ...READ MORE

May 22, 2020 in Python by Ibrahim Nezar
• 140 points
1,642 views
0 votes
1 answer

Size of an open file object

You can use the following and try ...READ MORE

Jan 22, 2019 in Python by SDeb
• 13,300 points
386 views
0 votes
1 answer

python JSON only get keys in first level

You just need a simple .keys() >>> dct ...READ MORE

Jan 22, 2019 in Python by SDeb
• 13,300 points
22,311 views
0 votes
0 answers

Is there any module in Python that I can use for Wiki markup?

Hi all, simple question. Is there any ...READ MORE

Jan 22, 2019 in Python by Anirudh
• 2,080 points
429 views
0 votes
0 answers

How can I update Git Code into a Docker container directly?

Hi all, with regard to the above ...READ MORE

Jan 22, 2019 in Python by Anirudh
• 2,080 points
1,559 views
0 votes
1 answer

How to enable python3 in vim?

You didn't tell us the platform you're ...READ MORE

Jan 21, 2019 in Python by SDeb
• 13,300 points
1,687 views
0 votes
1 answer

What is .pydistutils.cfg?

I don't immediately see a reason why ...READ MORE

Jan 21, 2019 in Python by SDeb
• 13,300 points
1,715 views
0 votes
1 answer

Need help with custom authentication in the Google App Engine using Python

Good question. Django 1.0 was updated recently ...READ MORE

Jan 21, 2019 in Python by Nymeria
• 3,560 points
1,177 views
0 votes
1 answer

How to use read a WSDL file from the file system using Python suds?

Hi, good question. It is a very simple ...READ MORE

Jan 21, 2019 in Python by Nymeria
• 3,560 points
7,777 views
0 votes
1 answer

Issue creating S3 Bucket Python

Hello @Suraj, There is an indentation issue, >>> ...READ MORE

Jan 18, 2019 in Python by Priyaj
• 58,090 points
1,004 views
0 votes
1 answer

print(instance(0).id) TypeError: 'list' object is not callable

Hey @Suraj, For me its working fine. ...READ MORE

Jan 18, 2019 in Python by Priyaj
• 58,090 points
2,495 views
0 votes
1 answer

Dictionary in NumPy array

You have a 0-dimensional array of object ...READ MORE

Jan 18, 2019 in Python by SDeb
• 13,300 points
8,372 views
0 votes
1 answer

df.mul vs df.rmul in Pandas

The documentation is not identical. As stated ...READ MORE

Jan 18, 2019 in Python by SDeb
• 13,300 points
923 views
0 votes
1 answer

What is the recommended way to randomize a list of strings using Python?

Hi. Nice question. Here is the simplified answer ...READ MORE

Jan 18, 2019 in Python by Nymeria
• 3,560 points
639 views
0 votes
1 answer

Need help checking the validity of an image file in Python

I went through the Python documentation and ...READ MORE

Jan 18, 2019 in Python by Nymeria
• 3,560 points
1,957 views
0 votes
1 answer

Error Code installing Scrapy

You can install it via pip wheel. Download ...READ MORE

Jan 17, 2019 in Python by SDeb
• 13,300 points
1,169 views
0 votes
1 answer

Shorter way to write a Python for loop

You can use the enumerate iterator: for i, ...READ MORE

Jan 17, 2019 in Python by SDeb
• 13,300 points
1,822 views
0 votes
1 answer

What is the equivalent of NotImplementedError using Python?

Hi, good question! One simple answer to your ...READ MORE

Jan 17, 2019 in Python by Nymeria
• 3,560 points
2,063 views
0 votes
1 answer

How to get textual output when using exceptions in Python?

Hi, the answer is pretty simple.  Without the ...READ MORE

Jan 17, 2019 in Python by Nymeria
• 3,560 points
705 views
0 votes
2 answers

How can I write code to find a palindrome in python without using string functions?

x="malayalam" y="" for i in x: ...READ MORE

Nov 3, 2020 in Python by Thangaraj
22,234 views
0 votes
1 answer

Can someone help me understand timedelta in Python?

Because timedelta is defined like: class datetime.timedelta([days,] [seconds,] ...READ MORE

Jan 16, 2019 in Python by charlie_brown
• 7,720 points
1,324 views
0 votes
1 answer

Get path from open file in Python

The key here is the name attribute ...READ MORE

Jan 16, 2019 in Python by SDeb
• 13,300 points
1,193 views