Trending questions in Python

0 votes
1 answer

Scripts along with pytype

Pytype ships with three scripts in addition ...READ MORE

Jun 7, 2019 in Python by Greg
378 views
0 votes
1 answer

Where do I get the Alpha test version of Python?

Hi @Jarvis, You can get the Also and ...READ MORE

Jun 6, 2019 in Python by Kim
421 views
0 votes
1 answer

Build Python on Windows

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

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

How do I check if a list is empty in python?

Hey @Vedant, that's pretty simple and straightforward: if ...READ MORE

May 28, 2019 in Python by Karthik
837 views
0 votes
1 answer

Can I make incompatible changes to Python?

Hi @Zaid, It's actually not very cool ...READ MORE

Jun 7, 2019 in Python by Greg
374 views
0 votes
0 answers

How can i get the content in the JSON format while making the GET requests in python?

While making POST requests how can we ...READ MORE

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

How to create Pandas series from numpy array?

Hi. Refer to the below command: import pandas ...READ MORE

Apr 1, 2019 in Python by Pavan
3,258 views
0 votes
1 answer

How can I raise an exception in Python so that it can later be caught via an except block?

It's pretty simple to raise a query  raise ...READ MORE

May 29, 2019 in Python by Umesh
737 views
0 votes
1 answer

How can I have only positive decimal numbers in Django using Python?

Hi, are you aware of something called ...READ MORE

Jan 30, 2019 in Python by Nymeria
• 3,560 points
5,885 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
901 views
0 votes
1 answer

The equivalent of a GOTO in python ​​

Gotos are universally reviled in computer science ...READ MORE

Sep 3, 2018 in Python by Priyaj
• 58,090 points
12,312 views
0 votes
1 answer

python dynamic class names

You can try the following code: classmap = ...READ MORE

May 23, 2019 in Python by ana1504.k
• 7,910 points
972 views
0 votes
1 answer

Importing across a python package

Placing the imports in __init__.py would be ...READ MORE

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

Shift all indices in NumPy array

You can use the following : y = ...READ MORE

Feb 26, 2019 in Python by SDeb
• 13,300 points
4,678 views
0 votes
0 answers

what is the use of python math module?

what are different functions that we can ...READ MORE

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

Access to development version of python through Git

Follow these steps; Install Git and other dependencies Fork the ...READ MORE

Jun 6, 2019 in Python by Lina
359 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
475 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
497 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
335 views
0 votes
1 answer

Python releases announcements

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

Jun 6, 2019 in Python by Trisha
340 views
0 votes
1 answer

How to check if a list is empty in python? [closed]

To check if a list is empty ...READ MORE

May 27, 2019 in Python by Nisa
• 1,090 points
759 views
0 votes
1 answer

How do I get a random number with a float range in python?

Use random.uniform(a, b): Returns a random floating point ...READ MORE

May 27, 2019 in Python by Kiran
750 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

Build python on Unix

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

Jun 6, 2019 in Python by Fez
314 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
606 views
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
702 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
304 views
0 votes
1 answer

How can I use the power function in python 2.7?

print(pow(3,4)) #this will return the exponentiation of 3 ...READ MORE

May 21, 2019 in Python by Mohammad
• 3,230 points
1,142 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
688 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
634 views
0 votes
1 answer

Pandas dataframe index range

You can print the range of pandas ...READ MORE

Apr 8, 2019 in Python by Karan
2,837 views
0 votes
1 answer

Install matplotlib - Python

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

May 30, 2019 in Python by Tara
588 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
841 views
0 votes
1 answer

print the random list's item index number in python

Hey @Alia, you can use a python ...READ MORE

May 28, 2019 in Python by Patrick
673 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
421 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
295 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
410 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
589 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
823 views
0 votes
0 answers

How can you raise a ValueError in python?

Can you give an example to show ...READ MORE

Jun 3, 2019 in Python by Waseem
• 4,540 points
393 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
471 views
0 votes
1 answer

How do you configure Django to send mail through Postfix?

You can do this by adding  settings.py ...READ MORE

Feb 25, 2019 in Python by SDeb
• 13,300 points
4,578 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,274 views
0 votes
1 answer

How to convert datetime.date to UTC timestamp in Python

In Python 3 (< 3.3) From the docs ...READ MORE

Oct 31, 2018 in Python by Priyaj
• 58,090 points
9,629 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
597 views
0 votes
1 answer

HTML to RTF string using Python

RTF seems a dicey format to convert ...READ MORE

Apr 11, 2019 in Python by SDeb
• 13,300 points
2,620 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,183 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
433 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
339 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
562 views