For questions about Python programming that are specific to version 3+ of the language.
I installed the latest version of Python (3.6.4 64-bit) and the latest version of PyCharm (2017.3.3 64-bit). Then I installed some modules …
I am new to Python, but I have experience in other OOP languages. My course does not explain the main …
I have this error:
Traceback (most recent call last):
File "python_md5_cracker.py", line 27, in <module>
I want to print the looped output to the screen on the same line.
How do I this in the …
I was trying to set default python version to python3 in Ubuntu 16.04. By default it is python2 (2.7). I followed below …
test1 = 0
test1 += 1
I am receiving the following error:
UnboundLocalError: local variable 'test1' referenced before assignment.
Recently I started using Python3 and it's lack of xrange hurts.
from time import time as t
For example, I have a string like this(return value of subprocess.check_output):
>>> b'a string'
In pre-historic times (Python 1.4) we did:
fp = open('filename.txt')
line = fp.readline()
if not line:
I'm a new Python programmer who is making the leap from 2.6.4 to 3.1.1. Everything has gone fine until I tried to …