Most viewed questions in Python

0 votes
0 answers

hello world, somebody can help me to correct this error

for label, value in s.iteritems():     s.set_value(label, ...READ MORE

Jun 6, 2020 in Python by WELL
• 140 points
917 views
0 votes
0 answers

Random word generator in Python

I'm essentially working on a project where ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points
916 views
0 votes
1 answer

What is memoryview in Python 3?

Before we get into what memory views ...READ MORE

Jul 26, 2019 in Python by Arvind
• 3,040 points
916 views
0 votes
1 answer

What are the features of Python 3?

Python 3 offers rich functionality making it ...READ MORE

May 28, 2019 in Python by Harsh
• 260 points
913 views
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
912 views
0 votes
1 answer

How to get score of prediction from random forest?

Well, there's a built-in method for this ...READ MORE

Sep 10, 2019 in Python by Arvind
• 3,040 points
912 views
0 votes
1 answer

how to compare two strings in python?

compare two string in python >>> s1="abc ...READ MORE

Mar 25, 2019 in Python by rajesh
• 1,270 points
910 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
909 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
909 views
0 votes
1 answer

What is Mypy in Python?

Mypy is an optional static type checker ...READ MORE

Jun 7, 2019 in Python by Avant
908 views
0 votes
1 answer

Flask-PageDown and MathJax

If you want to use the MATHJAX ...READ MORE

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

How can I upgrade specific packages using pip and a requirements file?

Hello @kartik, According to pip documentation example 3: pip install --upgrade ...READ MORE

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

How to put a variable inside a String using Python?

In the easiest way, you can create ...READ MORE

Nov 23, 2018 in Python by Nymeria
• 3,560 points

edited Dec 12, 2018 by Nymeria 907 views
0 votes
1 answer

i am getting this error "TypeError: tuple indices must be integers or slices, not Database"

Hi, @Shabaj, Regarding your query, I hope this ...READ MORE

Dec 10, 2020 in Python by Gitika
• 65,910 points
906 views
0 votes
1 answer

.join() method is used for what purpose in Python?

join() method is used to concatenate or ...READ MORE

May 14, 2019 in Python by Taj
• 1,080 points
906 views
0 votes
1 answer

How to enter this command “py -3 -m pip install -r requirements.txt”

Open cmd and type the command and ...READ MORE

Nov 15, 2020 in Python by Gitika
• 65,910 points
903 views
0 votes
0 answers

what is a name error in python?

why am i getting a name error ...READ MORE

Mar 8, 2019 in Python by anonymous
903 views
+1 vote
1 answer

How to comment multiple lines in Python?

Comments in Python begin with a # ...READ MORE

May 24, 2019 in Python by Nisa
• 180 points
902 views
0 votes
0 answers

ModuleNotFoundError: No module named 'pyQt5'

from pyQt5.QtWidgets import * def window(): ...READ MORE

Oct 8, 2021 in Python by anonymous
• 120 points
901 views
0 votes
1 answer

How to increase plt.title font size?

Try the following : import matplotlib.pyplot as plt plt.figtext(.5,.9,'Temperature', ...READ MORE

Feb 11, 2019 in Python by SDeb
• 13,300 points
901 views
0 votes
1 answer

Creating an empty list in Python

Here is how you can test which ...READ MORE

Aug 17, 2018 in Python by Priyaj
• 58,090 points
901 views
0 votes
1 answer

Error while installing Django with Anaconda.

This error is probably because you don't ...READ MORE

Jun 24, 2020 in Python by Sirajul
• 59,230 points
900 views
0 votes
1 answer

Equivalent for easy_install & pip

For pip you can check the User ...READ MORE

Nov 28, 2018 in Python by SDeb
• 13,300 points
900 views
0 votes
2 answers

How do I access command line arguments in Python?

import sys print(sys.argv) More specifically, if you run python example.py ...READ MORE

Jun 25, 2020 in Python by Karan
898 views
0 votes
1 answer

How to check if a substring is present in a string using Python?

To check if the substring exists in ...READ MORE

May 9, 2019 in Python by Sharan
897 views
0 votes
1 answer

How to exit from Python without traceback?

You are presumably encountering an exception and ...READ MORE

Oct 9, 2018 in Python by SDeb
• 13,300 points
897 views
0 votes
1 answer

What does numpy.reshape() function do in python?

numpy.reshape() gives a new shape to an ...READ MORE

May 29, 2019 in Python by Kyraa
896 views
0 votes
1 answer

Python Gtk.Entry placeholder text

Starting with Gtk+ 3.2 it's possible to ...READ MORE

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

How to change data types in Pandas DataFrame?

Hi@akhtar, You can use astype function to change ...READ MORE

Jun 23, 2020 in Python by MD
• 95,440 points
895 views
0 votes
1 answer

PyPI index vs simple index

The "simple" index protocol is read-only, intended ...READ MORE

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

Where is builtins module located?

The module is built-in to the python ...READ MORE

Jun 19, 2019 in Python by SDeb
• 13,300 points
893 views
0 votes
1 answer

Replacements for switch statement in Python?

To get the same function as a ...READ MORE

Feb 16, 2023 in Python by Rishu
• 300 points
890 views
0 votes
1 answer

Pointers in Python?

I want form.data['field'] and form.field.value to always have the same value This ...READ MORE

Aug 20, 2018 in Python by charlie_brown
• 7,720 points
890 views
0 votes
1 answer

How do I specify hexadecimal and octal integers in Python?

To represent an octal integer, precede the octal ...READ MORE

Jul 30, 2019 in Python by Meg
889 views
+1 vote
1 answer

What does the Raise keyword do in Python?

Hi! I think I can answer this - ...READ MORE

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

Need help using PYTHONPATH

PYTHONPATH only affects import statements, not the top-level Python interpreter's ...READ MORE

Dec 17, 2018 in Python by iangregor
• 300 points
888 views
0 votes
0 answers

TypeError: tuple indices must be integers or slices, not tuple

Im a begginer and im trying to ...READ MORE

Oct 19, 2020 in Python by peyman
• 120 points

edited Oct 19, 2020 by Gitika 887 views
+1 vote
1 answer

Error: current transaction is aborted, commands ignored until end of transaction block?

Hello @kartik, To get rid of the error, roll ...READ MORE

Jun 22, 2020 in Python by Niroj
• 82,880 points
887 views
0 votes
1 answer

What is the best online python compiler for running python scripts?

You can use Microsoft azure notebooks to ...READ MORE

Oct 14, 2020 in Python by anonymous
• 65,910 points
885 views
0 votes
2 answers

Unable to use print statement in python3

print will work when you use print("Your ...READ MORE

Feb 14, 2019 in Python by Shashank
• 1,370 points
883 views
0 votes
1 answer

Importing modules from parent folder

It seems that the problem is not ...READ MORE

Nov 26, 2020 in Python by Gitika
• 65,910 points
882 views
0 votes
1 answer

Error:PermissionError with pip3

Hello @kartik, Just install them using --user option ...READ MORE

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

Is it possible to create an array with all values as zero in python?

You can use  np.zeros(4,3) This will create a 4 ...READ MORE

May 24, 2019 in Python by Anjali
879 views
0 votes
1 answer

Python using basicConfig method to log to console and file

I can't reproduce it on Python 3.3. ...READ MORE

Aug 14, 2018 in Python by aryya
• 7,450 points
878 views
0 votes
1 answer

Correct way to write line to file?

This should be as simple as: with open('somefile.txt', ...READ MORE

Aug 3, 2018 in Python by Priyaj
• 58,090 points
877 views
0 votes
0 answers

Real time RGB graph from video

Hi!  I need to create a graphic ...READ MORE

Sep 16, 2020 in Python by Leonardo
• 120 points
876 views
0 votes
0 answers

How to read data in a bubble sort algorithm in python?

I am not able to read the ...READ MORE

Jul 31, 2019 in Python by Waseem
• 4,540 points
876 views
0 votes
1 answer

Python code to send an email message from 1 email id to another

Hi @Deb, try out the following code: import ...READ MORE

Jun 11, 2019 in Python by Picentra
876 views
0 votes
1 answer

How to get domain name of email ID?

You can use the split method to split the ...READ MORE

Mar 28, 2019 in Python by Firoz
876 views