Trending questions in Python

0 votes
1 answer

How can I deal with python eggs for multiple platforms in one location?

Try virtualenv : http://pypi.python.org/pypi/virtualenv This helps you create isolated ...READ MORE

May 28, 2019 in Python by SDeb
• 13,300 points
1,026 views
0 votes
1 answer

How do I convert type of an array in python?

Use the following command to change the ...READ MORE

May 24, 2019 in Python by Kishore
1,185 views
0 votes
1 answer

How to go to top frame in pdb (python debugger)

You can use a PdbExtension for this. See https://github.com/fschulze/pytest-pdb/pull/5 where ...READ MORE

Apr 30, 2019 in Python by SDeb
• 13,300 points
2,232 views
0 votes
1 answer

What is the most recent version of python 3?

Python 3.7.3 is the latest release of ...READ MORE

Jun 7, 2019 in Python by Harsh
• 180 points
783 views
0 votes
1 answer

Select more than one item randomly from the list

You can use random.sample() function in the ...READ MORE

May 28, 2019 in Python by Yesha
1,008 views
0 votes
0 answers

How does profiling work for python scripts?

can you write a sample script to ...READ MORE

Jun 3, 2019 in Python by Waseem
• 4,540 points
753 views
0 votes
1 answer

Python releases announcements

Hey @Gargi, all releases are announced on ...READ MORE

Jun 6, 2019 in Python by Trisha
580 views
0 votes
0 answers

How to do line continuation in python?

Is it same as the other programming ...READ MORE

May 30, 2019 in Python by Waseem
• 4,540 points
913 views
0 votes
1 answer

How can I find the square of a number in python?

You can use the exponentiation operator or ...READ MORE

May 21, 2019 in Python by Mohammad
• 3,230 points
1,379 views
0 votes
1 answer

Has Python 3.0 reached end of support?

The first release of Python 3 was ...READ MORE

Jun 7, 2019 in Python by Harsh
• 180 points
714 views
0 votes
1 answer

What to do when len() does not return the number of integers in range(1,100)?

You can use the following code block: x=range(1,100) len(x) Output: ...READ MORE

May 28, 2019 in Python by Fata
• 1,050 points
946 views
0 votes
1 answer

How to read data from a text file using Python?

Refer to the below example where the ...READ MORE

May 13, 2019 in Python by Sushma
1,609 views
0 votes
0 answers

what is the use of visual studio 2015 tool in python?

What purpose would it serve being a ...READ MORE

Jun 7, 2019 in Python by Waseem
• 4,540 points
526 views
0 votes
0 answers

What are some sources to learn design techniques in python?

The idea is to build creative error ...READ MORE

Jun 6, 2019 in Python by Waseem
• 4,540 points
565 views
0 votes
1 answer

Implementing a SAML client in Python

I know you are looking for a ...READ MORE

Apr 29, 2019 in Python by SDeb
• 13,300 points
2,168 views
0 votes
0 answers

What is socket programming in python?

How does sockets work actually? READ MORE

Jun 4, 2019 in Python by Waseem
• 4,540 points
642 views
0 votes
1 answer

Slice an array into multiple arrays - Python

can use numpy.reshape.  In your case, pass 1 ...READ MORE

May 29, 2019 in Python by Alia
852 views
0 votes
1 answer

Build python on Unix

Fork the CPython repository to your GitHub account and get ...READ MORE

Jun 6, 2019 in Python by Fez
512 views
0 votes
1 answer

Hive client for Python 3.x

If you have HiveServer2 installed you can ...READ MORE

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

How can I make Python's UnitTest Framework fail if an exception is raised by any thread?

I've come across this problem myself, and ...READ MORE

Dec 5, 2018 in Python by aryya
• 7,460 points
8,403 views
0 votes
1 answer

What are the best IDEs for Python?

I personally feel Pycharm is very charming ...READ MORE

May 31, 2019 in Python by Tushar
739 views
0 votes
1 answer

Convert data in dataframe - Python

Reshape dataframe using DataFrame.unstack for DatetimeIndex, then ...READ MORE

May 30, 2019 in Python by Gargi
781 views
0 votes
1 answer

Install matplotlib - Python

Execute the following commands to install matplotlib ...READ MORE

May 30, 2019 in Python by Tara
768 views
0 votes
0 answers

Trying to get a graph where if manufacturer is GHI, need to find all the products related to GHI

Trying to get a graph where if ...READ MORE

Jun 3, 2019 in Python by anonymous
630 views
0 votes
1 answer

Are there any copyrights restriction on python usage?

You can do anything and everything with ...READ MORE

May 31, 2019 in Python by Haseeb
713 views
0 votes
1 answer

Python BeautifulSoup CSS Selector

Yes, you can use the select() method of BeautifulSoup ...READ MORE

May 14, 2019 in Python by Jim
1,457 views
0 votes
1 answer

How Lambda() is used with filter() in python?

The filter() function in Python takes in ...READ MORE

May 20, 2019 in Python by Rakshi
1,186 views
0 votes
1 answer

Can't pickle defaultdict

A module-level function is a function which ...READ MORE

Apr 8, 2019 in Python by SDeb
• 13,300 points
2,993 views
0 votes
1 answer

Python Regex Search And Replace

You need not use a regex. Your ...READ MORE

May 20, 2019 in Python by SDeb
• 13,300 points
1,187 views
0 votes
1 answer

Is it possible to make android apps using python?

Yes, of course, it's possible. PyMob is ...READ MORE

May 31, 2019 in Python by Umer
700 views
0 votes
1 answer

How to put time delay in Python?

You can use sleep() method to sleep ...READ MORE

May 28, 2019 in Python by Taj
• 1,080 points
828 views
0 votes
0 answers

Is there a tool to help find bugs or perform static analysis?

Is there a tool to help find ...READ MORE

Jun 7, 2019 in Python by jinu
437 views
0 votes
1 answer

Exiting a multiprocessed python application safely

I ended up creating a Pipe for ...READ MORE

May 6, 2019 in Python by SDeb
• 13,300 points
1,773 views
0 votes
1 answer

What are the best IDE/platform to write code in Python

Just as any other programming language, even ...READ MORE

May 28, 2019 in Python by Harsh
• 260 points
835 views
0 votes
1 answer

Python script if-else statement doubt

The reason for this is that the else loop ...READ MORE

May 23, 2019 in Python by Rajan
1,021 views
0 votes
1 answer

What is a tuple in python?

A tuple is a collection data type ...READ MORE

May 21, 2019 in Python by Mohammad
• 3,230 points
1,129 views
0 votes
1 answer

How do I turn a list into numpy array?

Use this line: numpy_array = np.array(list) And printing/displaying the ...READ MORE

May 24, 2019 in Python by Isha
955 views
0 votes
1 answer

Does making two consecutive calls of random.choice(foo) return two different results

Each choice is random, so it can ...READ MORE

May 28, 2019 in Python by Akaya
782 views
0 votes
1 answer

Django session doesn't work in Firefox

You can try this: request.session.modified = True I hope ...READ MORE

May 6, 2019 in Python by SDeb
• 13,300 points
1,740 views
0 votes
1 answer

Dependencies required to build Matplotlib on ubuntu

If you are on Debian/Ubuntu, you can ...READ MORE

May 30, 2019 in Python by Tara
689 views
0 votes
1 answer

How to save Numpy array as image in python?

If you have matplotlib, you can do: import ...READ MORE

Nov 16, 2018 in Python by Nymeria
• 3,560 points
9,116 views
0 votes
1 answer

Writing a help for python script

You can use argparse. For example, with test.py: import ...READ MORE

Apr 25, 2019 in Python by SDeb
• 13,300 points
2,199 views
0 votes
0 answers

How can we use python for perl programming?

Is it a good practice to use ...READ MORE

Jun 4, 2019 in Python by Waseem
• 4,540 points
487 views
0 votes
1 answer

zeropad all the arrays to match the largest array in that file in python

You can try something like this: import numpy ...READ MORE

May 29, 2019 in Python by Wazeer
687 views
0 votes
1 answer

Python - Whitespace after

print adds a single space after every argument, including `\n'. ...READ MORE

May 30, 2019 in Python by SDeb
• 13,300 points
646 views
0 votes
0 answers

How can we use sqlite with WAL?

Can you give an example? READ MORE

May 29, 2019 in Python by Waseem
• 4,540 points

edited May 30, 2019 by Omkar 714 views
0 votes
1 answer

Map function with example in python

The map function executes the function_object for each ...READ MORE

May 23, 2019 in Python by Imran
927 views
0 votes
1 answer

How to check if a string ends with a character in python?

You can use the endswith method. It checks ...READ MORE

Apr 5, 2019 in Python by Srisha
3,010 views
0 votes
1 answer

Are there any dependancies for installing matplotlib in python?

Matplotlib requires the following dependencies: Python (>= 3.6) FreeType ...READ MORE

May 30, 2019 in Python by Farzi
583 views
0 votes
1 answer

How to add integer to python array?

You have defined a numpy array but ...READ MORE

Feb 4, 2019 in Python by Omkar
• 69,220 points
5,576 views