> ## Content Index
> Fetch the complete content index at: https://bioinformatics.ghost.io/llms.txt
> Use this file to discover other available public pages before exploring further.

# Issue with different Python versions
- URL: https://bioinformatics.ghost.io/different-python-versions/
- Published: 2019-08-23T01:05:27.000Z
- Updated: 2019-08-23T01:05:27.000Z
- Author: Aarthi Ramakrishnan
- Tags: programming, #Import 2026-08-27 15:34

Recently, I found that using different python versions to run the same code can lead to different results. I created 2 environments (using Anaconda) on my computer - one with Python 3.5.1, and the other with Python 3.6.7 (latest) as follows:

```bash
conda create -n python351 python=3.5.1
conda create -n python374 python=3.7.4

```

First, I loaded the environment python351 -

```bash
conda activate python351

```

I next saved the following python code in a file called code.py.

```python
dictionary = {}

dictionary['one'] = 1
dictionary['two'] = 2
dictionary['three'] = 3

for keys in dictionary:
	print(keys)

```

Upon running the above code by typing `python code.py` on the terminal, I found that the results are different each time I run it! The order of the printed keys of the dictionary is different in each run.

When I switched to python 3.7.4 using `conda activate python374` and ran the above code in a similar manner, the results in each run stayed the same. One must be very careful regarding such nuances while dealing with different python versions.