Top "Python-3.x" questions

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

Python3 integer division

In Python3 vs Python2.6, I've noticed that I can divide two integers and get a float. How do you get …

python python-3.x division
Python - difference between two strings

I'd like to store a lot of words in a list. Many of these words are very similar. For example …

python string python-3.x diff
Let JSON object accept bytes or let urlopen output strings

With Python 3 I am requesting a json document from a URL. response = urllib.request.urlopen(request) The response object is …

python json python-3.x encoding urlopen
Python - Get Yesterday's date as a string in YYYY-MM-DD format

As an input to an API request I need to get yesterday's date as a string in the format YYYY-MM-DD. …

python python-2.7 python-3.x date datetime
enumerate() for dictionary in python

I know we use enumerate for iterating a list but I tried it in a dictionary and it didn't give …

python python-3.x dictionary enumerate
Fixed digits after decimal with f-strings

Is there an easy way with Python f-strings to fix the number of digits after the decimal point? (Specifically f-strings, …

python python-3.x f-string
Accessing dict_keys element by index in Python3

I'm trying to access a dict_key's element by its index: test = {'foo': 'bar', 'hello': 'world'} keys = test.keys() # dict_…

python dictionary python-3.x key
How do I install Python 3 on an AWS EC2 instance?

I'm trying to install python 3.x on an AWS EC2 instance and: sudo yum install python3 doesn't work: No package …

python python-3.x amazon-web-services amazon-ec2
Reloading module giving NameError: name 'reload' is not defined

I'm trying to reload a module I have already imported in Python 3. I know that you only need to import …

python python-3.x
filedialog, tkinter and opening files

I'm working for the first time on coding a Browse button for a program in Python3. I've been searching the …

python python-3.x tkinter global-variables filedialog