Most voted questions in Python

+7 votes
4 answers

What's the coolest thing you've ever done using Python?

Python is an extremely interesting language. you ...READ MORE

Nov 27, 2019 in Python by Tini
1,918 views
+7 votes
8 answers

What exactly is the function of random.seed() in python?

The seed method is used to initialize the ...READ MORE

Oct 29, 2018 in Python by Rahul
125,709 views
+7 votes
2 answers

I want to build a recommender system incorporating diversity and accuracy in the recommender engine.

I dont know what exactly you are ...READ MORE

Sep 24, 2018 in Python by slayer
• 29,350 points
1,589 views
+7 votes
8 answers

Difference for string comparison in Python: 'is' vs. ==

If we use "==" means both variables ...READ MORE

Sep 3, 2018 in Python by Parul Raheja
1,810 views
+6 votes
4 answers

Python and Pygame: Difference

Python is a programming language. PyGame is a ...READ MORE

Oct 24, 2018 in Python by Priyaj
• 58,090 points
4,196 views
+5 votes
1 answer

Print the odd and even factors of a number in Python

x = int(input("Enter any number \n")) print("The factors ...READ MORE

Nov 19, 2018 in Python by Nabarupa
16,499 views
+5 votes
0 answers

How to send sms to users from Django application?

I'm looking for an option to send ...READ MORE

Nov 13, 2018 in Python by Manu
• 170 points
7,778 views
+5 votes
1 answer

Places to work as Python Developer?

Check the below link for different companies ...READ MORE

Sep 25, 2018 in Python by Priyaj
• 58,090 points
456 views
+5 votes
1 answer

What are metaclasses in Python?

A metaclass instantiates and defines behavior for ...READ MORE

Sep 11, 2018 in Python by Priyaj
• 58,090 points
599 views
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

Apr 11, 2018 in Python by hemant
• 5,790 points
3,509 views
+4 votes
4 answers

Python: UnicodeDecodeError: "utf-8" codec can"t decode byte 0xa0 in position 10: invalid start byte

You have to use the encoding as latin1 ...READ MORE

Jul 11, 2019 in Python by Ritu
323,616 views
+4 votes
3 answers

Write a for loop that prints all elements of a list and their position in the list. a = [4,7,3,2,5,9]

Try using this question by list comprehension: a=[4,7,3,2,5,9] print([x for ...READ MORE

Dec 9, 2019 in Python by vinaykumar
• 200 points
33,920 views
+4 votes
1 answer

Counting integers that are within intervals

Am not sure as this would give ...READ MORE

Sep 27, 2018 in Python by bug_seeker
• 15,520 points
1,090 views
+4 votes
7 answers

Splitting a List into chunks in Python

Here's a generator that yields the chunks ...READ MORE

Apr 13, 2018 in Python by Nietzsche's daemon
• 4,260 points
34,863 views
+4 votes
6 answers

Substring search in Python

Use the "in" operator in python" if "substring" ...READ MORE

Apr 13, 2018 in Python by Nietzsche's daemon
• 4,260 points
986 views
+4 votes
6 answers

Does Python have a ternary conditional operator like C does?

Yes, the syntax is: a if condition else ...READ MORE

Apr 13, 2018 in Python by Nietzsche's daemon
• 4,260 points
1,962 views
+4 votes
7 answers

What is an array in Python? How to declare it?

Python doesn't have a native array data ...READ MORE

Apr 12, 2018 in Python by anto.trigg4
• 3,440 points
2,537 views
+4 votes
3 answers

What does these operator mean **, ^, %, // ?

** - Performs exponential (power) calculation on ...READ MORE

Apr 12, 2018 in Python by anto.trigg4
• 3,440 points
1,073 views
+4 votes
6 answers

Use of "continue" in python

The break statement is used to "break" ...READ MORE

Jul 16, 2018 in Python by Omkar
• 69,210 points
1,229 views
+4 votes
8 answers

How can I use Python's range function?

The range function is mostly used in for-loop.  Ex: for ...READ MORE

Aug 21, 2018 in Python by Omkar
• 69,210 points
1,705 views
+3 votes
2 answers

sum of 1/2+2/3+3/4+...+n/n+1

num = int(input("Enter a number: ")) newnum = ...READ MORE

Dec 27, 2019 in Python by Nisha
• 200 points
12,341 views
+3 votes
0 answers

PyQt5, when I click button, it close window itself.

PyQt5, when I click button, it close ...READ MORE

Dec 9, 2019 in Python by 의철
• 150 points
3,432 views
+3 votes
2 answers

What does Python _init_ and self do?

Hey @Anirudh!  Self The self keyword is used to access ...READ MORE

Oct 31, 2018 in Python by Omkar
• 69,210 points
6,085 views
+3 votes
1 answer

Tensorflow 1.5 ImportError: No module named tensorflow.python.client

I think it's a bug in Tensorflow ...READ MORE

Sep 25, 2018 in Python by charlie_brown
• 7,720 points
6,593 views
+3 votes
2 answers

How do I install pip on Windows?

pip is already installed if you are ...READ MORE

Nov 2, 2018 in Python by Priyaj
• 58,090 points
996 views
+3 votes
5 answers

is python compatible with Linux?

Just follow these three commands and you ...READ MORE

Sep 12, 2018 in Python by charlie_brown
• 7,720 points
1,629 views
+3 votes
2 answers

how to print array integer without [] bracket in python like result = 1,2,3,4,5

Hey @abhijmr.143, you can print array integers ...READ MORE

Aug 5, 2018 in Python by Omkar
• 69,210 points

edited Aug 8, 2018 by Omkar 7,696 views
+3 votes
2 answers

Compiled vs Interpreted Languages

Compiled languages are written in a code ...READ MORE

Dec 3, 2018 in Python by allenvarna
• 540 points
5,109 views
+3 votes
5 answers

How to read multiple data files in python

Firstly we will import pandas to read ...READ MORE

Apr 6, 2018 in Python by DeepCoder786
• 1,720 points
14,812 views
+3 votes
7 answers

How can I rename a file in Python?

yes, you can use "os.rename" for that. ...READ MORE

Mar 31, 2018 in Python by DareDev
• 6,890 points
19,389 views
+2 votes
2 answers

ImportError: numpy.core.multiarray failed to import

try this... run this code one by one.... pip ...READ MORE

Nov 5, 2020 in Python by Anand Vijay Rajsri

reshown Nov 5, 2020 by Sirajul 34,167 views
+2 votes
2 answers

ModuleNotFoundError: No module named 'pyttsx3

Hi@akhtar, To avoid this error you have to ...READ MORE

Apr 24, 2020 in Python by MD
• 95,440 points
27,601 views
+2 votes
3 answers

ModuleNotFoundError: No module named 'cv2'

Hi@akhtar, This error may occur if you didn't install ...READ MORE

Apr 9, 2020 in Python by MD
• 95,440 points
266,773 views
+2 votes
0 answers

unsupported operand type error

tech_list=closingdata.pct_change() tech_list READ MORE

Jan 26, 2020 in Python by Anupriya
• 140 points
495 views
+2 votes
0 answers

Partial screenshot in Linux with Python Selenium

Taking a partial screenshot of an element by ...READ MORE

Jan 21, 2020 in Python by Noor
• 200 points
1,193 views
+2 votes
1 answer

Create column for str,contain in pandas

Hi Juzar So if I am not wrong ...READ MORE

Jan 6, 2020 in Python by Kalgi
• 52,360 points
563 views
+2 votes
0 answers

I don't want to seem like a begger, but I've been working on this code for the past 3 days and made 0 progress.

Basically, my code runs a turtle and ...READ MORE

Nov 26, 2019 in Python by Kyler
• 140 points
663 views
+2 votes
2 answers

Google search using Python

import webbrowser search=input('Search: ') webbrowser.open('https:// ...READ MORE

Dec 25, 2019 in Python by Makhmudov
2,437 views
+2 votes
3 answers

ModuleNotFoundError: No module named 'Crypto'

The module you’ve installed is different. To install ...READ MORE

Aug 20, 2019 in Python by Raman
77,821 views
+2 votes
1 answer

Import zip files and process the excel files ( inside the zip files ) by using pyspark connecting with pymongo

I found this sample code: import zipfile import io def ...READ MORE

Aug 19, 2019 in Python by Reshma
2,143 views
+2 votes
0 answers

I am trying to create mininet, but I cannot ping all host and switch

I am trying to do mininet environment ...READ MORE

Aug 4, 2019 in Python by Jiun-Jung
• 140 points
2,177 views
+2 votes
1 answer

How to check the state of a user given instance id using filters

Seems like the "ec2_con_re.instances" you are using ...READ MORE

Aug 1, 2019 in Python by Aishwarya
757 views
+2 votes
2 answers

UnicodeDecodeError: "utf-8" codec can't decode byte in position : invalid start byte

You have to use the encoding as latin1 ...READ MORE

Jul 23, 2019 in Python by Kunal
243,067 views
+2 votes
2 answers

What is the difference between print and return in python?

Return statements end the execution of a ...READ MORE

Aug 26, 2019 in Python by anonymous
7,492 views
+2 votes
1 answer

How can I record the X,Y limits of a displayed X,Y plot using the matplotlib show() module?

A couple hours after posting this question ...READ MORE

Dec 27, 2018 in Python by anonymous
870 views
+2 votes
1 answer

How to install pip in windows?

Step 1:  Open the following link and go to ...READ MORE

Nov 27, 2018 in Python by Priyaj
• 58,090 points
4,890 views
+2 votes
1 answer

“OSError: Unable to open file (bad superblock version number)" in python h5py file read

File could indeed be opened on Linux ...READ MORE

Sep 26, 2018 in Python by Priyaj
• 58,090 points
6,170 views
+2 votes
2 answers

Job roles for Python

Hey, Python Developer responsibilities include writing and testing ...READ MORE

May 16, 2019 in Python by Gitika
• 65,910 points
941 views
+2 votes
1 answer

How do you make a block comment in python?

''' This is a multiline comment. I ...READ MORE

Aug 23, 2018 in Python by Priyaj
• 58,090 points
753 views
+2 votes
4 answers

python 2d array

You should make a list of lists, ...READ MORE

Oct 18, 2018 in Python by ritu
1,006 views