Trending questions in Python

+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
1,323 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
2,404 views
+1 vote
2 answers

Does 'finally' always execute in Python?

The "finally" executes almost everytime. But there ...READ MORE

Aug 31, 2018 in Python by Omkar
• 69,220 points
6,358 views
0 votes
1 answer

What is the meaning of “int(a[::-1])” in Python?

Assumming a is a string. The Slice ...READ MORE

Aug 27, 2018 in Python by Priyaj
• 58,020 points
6,581 views
–1 vote
2 answers

How to find the size of a string in Python?

following way to find length of string  x ...READ MORE

Mar 29, 2019 in Python by rajesh
• 1,270 points
2,402 views
0 votes
1 answer

popen.communicate in Python

Your second bit of code starts the ...READ MORE

Nov 13, 2018 in Python by Priyaj
• 58,020 points
3,189 views
0 votes
1 answer

Avoid killing children when parent process is killed

I would recommend against your design as ...READ MORE

Sep 7, 2018 in Python by Priyaj
• 58,020 points
6,084 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,440 points
5,182 views
0 votes
1 answer

Declare variable without assigning any value in Python?

var = None Python is dynamic, so you ...READ MORE

Oct 29, 2018 in Python by Priyaj
• 58,020 points
3,802 views
0 votes
1 answer

Need help installing easy_install in Python 2.7.1 on Windows 7

That tool is part of the setuptools ...READ MORE

Dec 26, 2018 in Python by Nymeria
• 3,560 points
1,294 views
0 votes
1 answer

Measuring the distance between pixels on OpenCv with Python

Assuming input frames will have "close to ...READ MORE

Sep 11, 2018 in Python by Priyaj
• 58,020 points
5,793 views
0 votes
1 answer

How do I determine if my python shell is executing in 32bit or 64bit mode on OS X?

UPDATED: One way is to look at sys.maxsize as ...READ MORE

Dec 11, 2018 in Python by aryya
• 7,460 points
1,856 views
0 votes
0 answers

Creating a mini language parser using Python

I'm planning to create a simple mini-language ...READ MORE

Dec 27, 2018 in Python by Anirudh
• 2,090 points
1,208 views
0 votes
1 answer

How to parse date/time string with timezone abbreviated name in Python?

The parse() function in dateutil can't handle ...READ MORE

Nov 27, 2018 in Python by Nymeria
• 3,560 points
2,456 views
+1 vote
2 answers

Python string formatting: % vs. .format

Using Python format() function is what the ...READ MORE

Apr 11, 2019 in Python by Dasa Ravi
1,560 views
0 votes
3 answers

How to get the current time in Python

FOLLOWING WAY TO FIND CURRENT TIME IN ...READ MORE

Apr 8, 2019 in Python by rajesh
• 1,270 points
2,212 views
0 votes
1 answer

How to implement Queue in python

You are missing this  from queue import * This ...READ MORE

Nov 2, 2018 in Python by Nabarupa
3,388 views
0 votes
1 answer

Read & write data in mifare card

Hi, you can check out the following ...READ MORE

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

How to read lines from compressed text files in Python

Is it easy to read a line ...READ MORE

Dec 27, 2018 in Python by Anirudh
• 2,090 points
1,046 views
0 votes
1 answer

Return a list inside a for loop while iterating over the elements of another list

The print() is getting called multiple times ...READ MORE

Sep 22, 2018 in Python by SDeb
• 13,300 points
5,169 views
0 votes
1 answer

Global Send Keys - Input text which has '(' is not working

Global Send Keys internally uses System.Windows.Forms.SendKeys so special characters escaped. For more ...READ MORE

Nov 15, 2018 in Python by findingbugs
• 3,260 points
2,744 views
0 votes
1 answer

Is Brython client side?

Brython itself seems to be completely client ...READ MORE

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

How to download intext images with beautiful soup

Try this: html_data = """ <td colspan="3"><b>"Assemble under ...READ MORE

Sep 10, 2018 in Python by Priyaj
• 58,020 points
5,545 views
0 votes
1 answer

MemoryError binary data storage

The problem occurs when you are using ...READ MORE

Dec 26, 2018 in Python by SDeb
• 13,300 points
867 views
0 votes
1 answer

How to declare array in Python?

In Python "list" is the class that ...READ MORE

Nov 21, 2018 in Python by Nabarupa
2,385 views
0 votes
1 answer

How can I change the data type to string in Python?

You can use str(variablename) This is called conversion ...READ MORE

Dec 18, 2018 in Python by Shuvodip
1,186 views
0 votes
1 answer

What does calling a function means in Python?

Calling a function means that you are ...READ MORE

Dec 18, 2018 in Python by Shuvodip
1,162 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
1,265 views
0 votes
1 answer

How to correctly return an a dictionary as an output in zappier code using python?

David here, from the Zapier Platform team. ...READ MORE

Dec 3, 2018 in Python by charlie_brown
• 7,720 points
1,766 views
0 votes
1 answer

Difference between iterators & generators

iterator is a more general concept: any ...READ MORE

Oct 29, 2018 in Python by SDeb
• 13,300 points
3,230 views
0 votes
1 answer

NaN variable without NumPy

Yes, It is possible to use the ...READ MORE

Nov 26, 2018 in Python by SDeb
• 13,300 points
2,017 views
+1 vote
2 answers

How to use the pass statement in Python

In Python programming, pass is a null statement. The ...READ MORE

Apr 5, 2019 in Python by anonymous
1,179 views
0 votes
1 answer

Installing OpenCV for Python 2.7

Now from OpenCV 2.2.0, the package name ...READ MORE

Nov 15, 2018 in Python by findingbugs
• 3,260 points
2,475 views
0 votes
1 answer

What is the preferred way to concatenate strings in python??

If the strings you are concatenating are ...READ MORE

Dec 21, 2018 in Python by charlie_brown
• 7,720 points
934 views
0 votes
1 answer

How to install OpenCV for Python 2.7?

The official OpenCV installer does not install ...READ MORE

Nov 14, 2018 in Python by SDeb
• 13,300 points
2,492 views
0 votes
1 answer

I have a dictonary in python how to access the value field?

dic={"car":["limo","sedan"]} print (dic.keys())    <-----------------------Fetch the key "car" print (dic['car'][0])   <------------------------Fetch ...READ MORE

Dec 20, 2018 in Python by Shuvodip
966 views
0 votes
1 answer

How to add python console in spyder

(Spyder developer here) The Python console was ...READ MORE

Sep 18, 2018 in Python by Priyaj
• 58,020 points
4,959 views
0 votes
2 answers

How can I install external binaries using portable python

0110100001000101001010101001011010100100111100101001 READ MORE

Jan 24, 2019 in Python by anonymous
2,361 views
+1 vote
1 answer

How to Profile a script in Python

Python includes a profiler called cProfile. It ...READ MORE

Nov 21, 2018 in Python by SDeb
• 13,300 points
2,126 views
0 votes
1 answer

Is there an expression for an infinite generator in Python?

you can iterate over a callable returning ...READ MORE

Nov 20, 2018 in Python by Nymeria
• 3,560 points
2,201 views
0 votes
1 answer

Difference between module and Package in Python

A module is basically a single file ...READ MORE

Nov 13, 2018 in Python by SDeb
• 13,300 points
2,484 views
0 votes
1 answer

What is the difference between staticmethod and classmethod?

A staticmethod is a method that knows nothing about ...READ MORE

Dec 18, 2018 in Python by abc
976 views
0 votes
1 answer

% operator in print() statement

'(%g,%g)' is the template and (blank.x,blank.y) are the values which ...READ MORE

Nov 15, 2018 in Python by findingbugs
• 3,260 points
2,350 views
0 votes
1 answer

Question on PyQt: How to connect a signal to a slot to start a background operation in Python

It shouldn't matter whether the connection is ...READ MORE

Nov 27, 2018 in Python by Nymeria
• 3,560 points
1,816 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
3,423 views
0 votes
1 answer

Empty a list in python.

You could use the clear() method of list which is parallel ...READ MORE

Dec 18, 2018 in Python by Shuvodip
860 views
0 votes
1 answer

How to run django unit-tests on production database in Python?

In case someone googles here searching for ...READ MORE

Nov 28, 2018 in Python by Nymeria
• 3,560 points
1,668 views
0 votes
1 answer

How to resize image canvas to maintain square aspect ratio in Python, OpenCv

Building on Alexander-Reynolds answer above, here is ...READ MORE

Sep 4, 2018 in Python by Priyaj
• 58,020 points
5,318 views
0 votes
2 answers

How to use threading in Python?

 Thread is the smallest unit of processing that ...READ MORE

Apr 6, 2019 in Python by anonymous
1,492 views
0 votes
1 answer

How to change one character in a string in Python?

Python strings are immutable, you change them ...READ MORE

Dec 4, 2018 in Python by Nymeria
• 3,560 points
1,373 views