Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Python

Python Questions & Answers

Browse 802 Python questions and answers from learners and industry experts. Find practical fixes, interview prep and step-by-step solutions - or ask your own.

802Discussions
914Answers
1Waiting for an answer
Ask a Python Question →
Browse by topic: Angular HTML Module

Represent infinity as an integer in Python 2.7

I am wondering how to define inf and -inf as an int in Python 2.7. I tried and it seems inf and -inf only works as a float.a = float('-inf') # worksb…

Python

1 Answer · 28 Views · Answered ✓

Asked by: Anusha Acharya · 5 years ago

What does `from six.moves import urllib` do in Python?

I was working on some code in Python and I came across a package named:from six.moves import urllibI cannot find the urllib.py anywhere. I found that…

Python

1 Answer · 29 Views · Answered ✓

Asked by: Anusha Acharya · 5 years ago

Can someone explains __all__ in Python?

I have been using Python more and more, and I keep seeing the variable __all__ set in different __init__.py files. Can someone explain what this does?

Python

1 Answer · 25 Views · Answered ✓

Asked by: Anusha Acharya · 5 years ago

Converting from a string to boolean in Python?

Does anyone know how to do the conversion from a string to a boolean in Python?The reason I asked this is because I learned int("string"), from here.…

Python

1 Answer · 1.3K Views · Answered ✓

Asked by: Peter Wilkins · 5 years ago

How to implement the Softmax function in Python

There are many activation functions in machine learning. I’m unable to understand the softmax function. Softmax function calculates the sum of…

Python

1 Answer · 46 Views · Answered ✓

Asked by: Anusha Acharya · 5 years ago

how to exit a python script in an if statement

I'm using Python 3.2 and trying to exit it after the user inputs that they don't want to continue, is there code that will exit it in an if statement…

Python

1 Answer · 1.2K Views · Answered ✓

Asked by: Rutuja Mishra · 5 years ago

Convert hex string to int in Python

How do I convert a hex string to an int in Python?I may have it as "0xffff" or just "ffff".

Python

1 Answer · 1.0K Views · Answered ✓

Asked by: Aashish chaursiya · 5 years ago

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Python Blogs

Guides, tips and career advice on Python from JanBask experts.

Explore other technologies

Pick another topic to find answers, interview questions, and real-world tips.