Most answered questions in Python

0 votes
1 answer

/usr/bin/env: ‘python’: No such file or directory

Hi@akhtar, It seems your python script is not ...READ MORE

Sep 20, 2020 in Python by MD
• 95,440 points
47,492 views
0 votes
1 answer

how to create a password in python 1 alphabet 1 digit 1character

You can make use of this:  ^(?=.*[a-zA-Z])(?=.*\d)(?=.*[!@#$%^&*()_+])[A-Za-z\d][A-Za-z\d!@#$%^&*()_+]{7,19}$ [A-Za-z\d] Ensures that ...READ MORE

Sep 18, 2020 in Python by Roshni
• 10,520 points
650 views
0 votes
1 answer

print the character from string if character is alphabet

You can use str.isalpha() For example: s = 'a123b' for ...READ MORE

Sep 18, 2020 in Python by Roshni
• 10,520 points
330 views
0 votes
1 answer

shows "name connection not defined"

Hi, @Imthiii, Try removing the bracket you have ...READ MORE

Sep 17, 2020 in Python by Rajiv
• 8,910 points
7,309 views
0 votes
1 answer

Got an error while installing opencv-python

Hello @Nishant, The error you got itself suggest ...READ MORE

Sep 17, 2020 in Python by Niroj
• 82,880 points
10,206 views
0 votes
1 answer

How to list a column of float values from csv file without importing (Python)

Using the default CSV module Demo: import csv with open(filename, "r") ...READ MORE

Sep 16, 2020 in Python by Rajiv
• 8,910 points
8,516 views
0 votes
1 answer

Module turtle has no listen member and module turtle has no onley member

Hi, @Edureka Are you facing this above mentioned ...READ MORE

Sep 15, 2020 in Python by Gitika
• 65,910 points
732 views
0 votes
1 answer

question related to python laungauge

Hi, @XYZGOD, Python has a  built-in input() function that accepts user-generated ...READ MORE

Sep 15, 2020 in Python by Gitika
• 65,910 points
491 views
0 votes
1 answer

Failed building wheel for wordcloud #105

If you are running Python 3.5 you ...READ MORE

Sep 14, 2020 in Python by Gitika
• 65,910 points
753 views
0 votes
1 answer

How to check if a float value(decimal number) is between range(0 to 10) in python

Hello,  A function that returns True for an integer number (int or ...READ MORE

Sep 14, 2020 in Python by Niroj
• 82,880 points
6,733 views
0 votes
1 answer

Python Requests module - Import Error: No module named requests

Run with Python 3 from the command ...READ MORE

Sep 11, 2020 in Python by Malik Brahimi
19,950 views
0 votes
1 answer

ImportError: No module named requests

To install requests module on Debian/Ubuntu for Python2: $ sudo ...READ MORE

Sep 11, 2020 in Python by Deming
1,202 views
0 votes
1 answer

Installing PIL with pip

Install Xcode and Xcode Command Line Tools ...READ MORE

Sep 11, 2020 in Python by FogleBird
4,322 views
0 votes
1 answer

How do I install pip on macOS or OS X?

All you have to do is: sudo easy_install ...READ MORE

Sep 11, 2020 in Python by Ahmad Awais
1,006 views
0 votes
1 answer

Could not find a version that satisfies the requirement PIL==1.1.7 #6

Honestly, as long as you have the ...READ MORE

Sep 11, 2020 in Python by Gitika
• 65,910 points
2,182 views
0 votes
1 answer

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

This error occurs because you are using ...READ MORE

Sep 9, 2020 in Python by Gitika
• 65,910 points
13,715 views
0 votes
1 answer

How can I optimize this condition so that it takes less time to execute in Python Pandas.

Hello @moli, You can easily optimize this code ...READ MORE

Sep 8, 2020 in Python by Niroj
• 82,880 points
334 views
0 votes
1 answer
0 votes
1 answer

CAn i have source code of image steganography please

Least Significant Bit (LSB) is a technique in which ...READ MORE

Sep 7, 2020 in Python by Roshni
• 10,520 points
927 views
0 votes
1 answer

when I run this, I get TypeError: int() takes at most 2 arguments (3 given). How to solve this?

Hi@MUHAMMAD, You are trying to pass State in ...READ MORE

Sep 7, 2020 in Python by akhtar
• 38,230 points
4,487 views
0 votes
1 answer

when I run this, I get NameError: name 'state' is not defined error. How to solve this?

Hi@MUHAMMAD, I tried to run the exact code ...READ MORE

Sep 8, 2020 in Python by MD
• 95,440 points
2,519 views
0 votes
1 answer

Where I am doing wrong?

Hello @Sana, Lines 3, 6-8 look very sketchy.Here ...READ MORE

Sep 7, 2020 in Python by Niroj
• 82,880 points
927 views
0 votes
1 answer

is there a way to send sql query data from redshift and send the data via email to sns?

I resolved this issue using AWS Glue ...READ MORE

Nov 21, 2020 in Python by Ruben
• 180 points
1,227 views
0 votes
1 answer

How to get all links and all elements that are clickable on a page of system dynamically?

Hello, You can do it by using find_elements_by_xpath() driver ...READ MORE

Aug 27, 2020 in Python by Niroj
• 82,880 points
4,978 views
0 votes
1 answer

Is there a way to store this text in a list using selenium (python)

Try using this code snippet to resolve ...READ MORE

Aug 24, 2020 in Python by Carlos
1,215 views
0 votes
1 answer

AttributeError: __enter__

Hey, @Archisman, in case of this: with sr.Microphone as ...READ MORE

Aug 24, 2020 in Python by Gitika
• 65,910 points
2,499 views
0 votes
1 answer

how do i get anova table of split plot design or factorial experimental design in python?

Hello @ kapil, For your query you can refer ...READ MORE

Aug 24, 2020 in Python by Niroj
• 82,880 points
716 views
0 votes
1 answer

how to get anova table of split plot design in python

Hello @kapil, A split plot design is a ...READ MORE

Aug 24, 2020 in Python by Niroj
• 82,880 points
1,240 views
0 votes
1 answer

how to fetch user details and send it to his email address using django rest framework

Hello @mahesh, First you have to fetch user ...READ MORE

Aug 18, 2020 in Python by Niroj
• 82,880 points
4,047 views
0 votes
1 answer

How can I unit test django messages?

Hello @kartik, Try use: response = self.client.post('/foo/') messages = list(response.context['messages']) self.assertEqual(len(messages), ...READ MORE

Aug 17, 2020 in Python by Niroj
• 82,880 points
2,210 views
0 votes
1 answer

How to strip html/javascript from text input in django?

Hello @kartik, Django provides an utility function to ...READ MORE

Aug 17, 2020 in Python by Niroj
• 82,880 points
1,644 views
0 votes
1 answer

How can I return HTTP status code 204 from a Django view?

Hello, Try this: return HttpResponse(status=204) Hope it works!! ...READ MORE

Aug 17, 2020 in Python by Niroj
• 82,880 points
6,430 views
0 votes
1 answer

How to allow users to change their own passwords in Django?

Hello @kartik, See the Changing passwords section Navigation to your project ...READ MORE

Aug 17, 2020 in Python by Niroj
• 82,880 points
863 views
0 votes
1 answer

Error:Manager isn't accessible via model instances

Hello @kartik, The error caused when you try ...READ MORE

Aug 17, 2020 in Python by Niroj
• 82,880 points
6,123 views
0 votes
1 answer

Error: No module named psycopg2.extensions

Hello @kartik, The first thing to do is ...READ MORE

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

ImportError: cannot import name user

Hello @kartik, You missed the models - and ...READ MORE

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

How to debug Django commands in PyCharm?

Hello @kartik, You can debug a custom Django ...READ MORE

Aug 17, 2020 in Python by Niroj
• 82,880 points
4,130 views
0 votes
1 answer

How to create a user in Django?

Hello @kartik, The correct way to create a ...READ MORE

Aug 17, 2020 in Python by Niroj
• 82,880 points
11,635 views
0 votes
1 answer

How to configure where to redirect after a log out in Django?

Hello @kartik, You don't need to overwrite or ...READ MORE

Aug 17, 2020 in Python by Niroj
• 82,880 points
3,483 views
0 votes
1 answer

How to reverse a string in Python using slicing operator?

Hi@akhtar, Strings can be reversed using slicing. To ...READ MORE

Aug 17, 2020 in Python by MD
• 95,440 points
3,348 views
0 votes
1 answer

How to load python script in Jupyter Notebook?

Hi@akhtar, Starting from IPython 3 (now Jupyter project), ...READ MORE

Aug 17, 2020 in Python by MD
• 95,440 points
14,481 views
0 votes
1 answer

How to import a folder in Jupyter Notebook?

Hi@akhtar, There is no simple way to import ...READ MORE

Aug 17, 2020 in Python by MD
• 95,440 points
22,382 views
0 votes
1 answer

Error:“CSRF token missing or incorrect” while post parameter via AJAX in Django

Hello @kartik, The simplest way to include the {{csrf_token}} value ...READ MORE

Aug 13, 2020 in Python by Niroj
• 82,880 points
12,673 views
0 votes
1 answer

In Django Admin how do I disable the Delete link?

Hello @kartik, Simple you can use this code: class ...READ MORE

Aug 13, 2020 in Python by Niroj
• 82,880 points
1,978 views
0 votes
1 answer

How to filter my model on the basis of text length in django?

Hello @kartik, For Django >= 1.8 you can ...READ MORE

Aug 13, 2020 in Python by Niroj
• 82,880 points
3,802 views
0 votes
1 answer

How do I use the built in password reset/change views with my own templates?

Hello @kartik, You'll notice that password_reset takes a named parameter ...READ MORE

Aug 13, 2020 in Python by Niroj
• 82,880 points
1,248 views
0 votes
1 answer

How to expire session due to inactivity in Django?

Hello @kartik, Expire the session on browser close ...READ MORE

Aug 13, 2020 in Python by Niroj
• 82,880 points
9,781 views
0 votes
1 answer

How can I have Multiple Models in a single django ModelForm?

Hello @kartik, You can just show both forms ...READ MORE

Aug 13, 2020 in Python by Niroj
• 82,880 points
11,380 views
0 votes
1 answer

How to inject errors into already validated form?

Hello @kartik, For Django 1.7+, you should use form.add_error() instead ...READ MORE

Aug 13, 2020 in Python by Niroj
• 82,880 points
1,138 views
0 votes
1 answer

How to send a correct authorization header for basic authentication

Hello @kartik, Here is how to do Basic ...READ MORE

Aug 13, 2020 in Python by Niroj
• 82,880 points
8,153 views