Most voted questions in Python

+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,050 points
137 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
389 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
• 56,200 points
111 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
807 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
• 56,200 points
39 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
• 56,200 points
27 views
+4 votes
1 answer

Counting integers that are within intervals

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

Sep 26, 2018 in Python by bug_seeker
• 15,320 points
40 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
3,886 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
84 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
113 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 11, 2018 in Python by anto.trigg4
• 3,420 points
193 views
+4 votes
3 answers

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

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

Apr 11, 2018 in Python by anto.trigg4
• 3,420 points
38 views
+4 votes
6 answers

Lowercase in Python

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

Apr 11, 2018 in Python by hemant
• 5,750 points
119 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
• 67,290 points
125 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
• 67,290 points
50 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
• 67,290 points
80 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,710 points
2,200 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
• 56,200 points
68 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,710 points
71 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 4, 2018 in Python by Omkar
• 67,290 points

edited Aug 8, 2018 by Omkar 479 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,700 points
1,340 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,810 points
111 views
+2 votes
0 answers
+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 in Python by Jiun-Jung
• 140 points
18 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 in Python by Aishwarya
19 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
73 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
• 56,200 points
1,830 views
+2 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
344 views
+2 votes
5 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
14,349 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
• 56,200 points
894 views
+2 votes
2 answers

Job roles for Python

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

May 16 in Python by Gitika
• 25,300 points
37 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
• 56,200 points
50 views
+2 votes
2 answers

Compiled vs Interpreted Languages

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

Dec 3, 2018 in Python by allenvarna
• 520 points
221 views
+2 votes
11 answers

How to print array/ list without brackets in python?

print(*names, sep = ', ') This is what ...READ MORE

Dec 10, 2018 in Python by Sudo
19,068 views
+2 votes
4 answers

python 2d array

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

Oct 18, 2018 in Python by ritu
93 views
+2 votes
6 answers

How can I change directory or "cd" in Python?

Context Manager: cd import os class cd:     """Context manager for ...READ MORE

Oct 18, 2018 in Python by Nabarupa
86 views
+2 votes
6 answers

Slicing in Python

Index: ------------> ...READ MORE

Oct 18, 2018 in Python by abc
53 views
+2 votes
2 answers

In a list of dictionaries, how can I find the minimum calue in a common dictionary field.

There are several options. Here is a ...READ MORE

Apr 10, 2018 in Python by charlie_brown
• 7,710 points
52 views
+2 votes
2 answers

How can I plot a k-dsitance graph using python?

Hi there, instead of sklearn you could ...READ MORE

Apr 10, 2018 in Python by charlie_brown
• 7,710 points
1,065 views
+2 votes
2 answers

How to use BeatifulSoup for webscraping?

your programme is fine until you start ...READ MORE

Apr 4, 2018 in Python by charlie_brown
• 7,710 points
31 views
+2 votes
3 answers

How can I play an audio file in the background using Python?

down voteacceptedFor windows: you could use  winsound.SND_ASYNC to play them ...READ MORE

Apr 3, 2018 in Python by charlie_brown
• 7,710 points
1,498 views
+2 votes
2 answers

How to make a laplacian pyramid using OpenCV python?

down voteacceptTheeThe problem is that you're iterating ...READ MORE

Apr 3, 2018 in Python by charlie_brown
• 7,710 points
1,173 views
+2 votes
2 answers

How can I replace values with 'none' in a dataframe using pandas

Actually in later versions of pandas this ...READ MORE

Aug 13, 2018 in Python by bug_seeker
• 15,320 points
4,707 views
+2 votes
2 answers

Error while printing hello world in python.

You must be trying this command in ...READ MORE

Mar 31, 2018 in Python by GandalfDwhite
• 1,320 points
76 views
+2 votes
3 answers

what is the practical use of polymorphism in Python?

Polymorphism is the ability to present the ...READ MORE

Mar 31, 2018 in Python by anto.trigg4
• 3,420 points
1,202 views
+2 votes
2 answers

How can I create a new file in Python?

You can try the below code which ...READ MORE

Mar 31, 2018 in Python by anto.trigg4
• 3,420 points
78 views
+1 vote
1 answer

How to automate image upload from my computer to site using python-selenium?

Hi, please try using following script to ...READ MORE

4 days ago in Python by Abha
• 19,130 points
11 views
+1 vote
1 answer

Scrapping News Website

Hey @Irshad Shaikh! We don't have a ...READ MORE

Aug 8 in Python by Edureka
• 1,280 points
14 views
+1 vote
1 answer

Why does print() run only after executing for loop in Python?

Your stdout is line-buffered; this means that it won't ...READ MORE

Aug 1 in Python by Neel
• 2,450 points
12 views
+1 vote
1 answer

How to print a pyramid of asterisks in Python?

This is one of the most frequently ...READ MORE

Aug 1 in Python by Neel
• 2,450 points
11 views