Top "Python-3.x" questions

For questions about Python programming that are specific to version 3+ of the language.

Importing class from another file

Before you mark it as duplicate please read my problem: I am trying to import a class from a file …

python python-3.x
What's the difference between `raw_input()` and `input()` in Python 3?

What is the difference between raw_input() and input() in Python 3?

python python-3.x input
Download file from web in Python 3

I am creating a program that will download a .jar (java) file from a web server, by reading the URL …

python python-3.x
How to install PyQt4 on Windows using pip?

I'm using Python 3.4 on Windows. When I run a script, it complains ImportError: No Module named 'PyQt4' So I …

python python-3.x pyqt pyqt4 pip
Python 3 turn range to a list

I'm trying to make a list with numbers 1-1000 in it. Obviously this would be annoying to write/read, so …

python python-3.x list range
What is __pycache__?

From what I understand, a cache is an encrypted file of similar files. What do we do with the __pycache__ …

python python-3.x caching
Using both Python 2.x and Python 3.x in IPython Notebook

I use IPython notebooks and would like to be able to select to create a 2.x or 3.x python notebook …

python python-2.7 python-3.x ipython ipython-notebook
AttributeError: 'module' object has no attribute 'urlopen'

I'm trying to use Python to download the HTML source code of a website but I'm receiving this error. Traceback (…

python python-3.x urllib
How to delete last item in list?

I have this program that calculates the time taken to answer a specific question, and quits out of the while …

python time python-3.x
How to strip all whitespace from string

How do I strip all the spaces in a python string? For example, I want a string like strip my …

python python-3.x spaces strip