I'm a C programmer learning Python 3 for the first time. This is my first script.
# -*- coding: utf-8 -*-
print ("Hello World!")
print ("Ä 0196, Ë 0203, Ï 0207, Ö 0214, Ü 0220, Ÿ 0159.")
Here is some setup and the output:
C:\Users\K\Desktop\Code\Python\Korgan\LearnPythonTheHardWay>chcp 65001
Active code page: 65001
C:\Users\K\Desktop\Code\Python\Korgan\LearnPythonTheHardWay>set PYTHONIOENCODING=utf-8
C:\Users\K\Desktop\Code\Python\Korgan\LearnPythonTheHardWay>py ex1.py
Hello World!
Ä 0196, Ë 0203, Ï 0207, Ö 0214, Ü 0220, Ÿ 0159.
159.
C:\Users\K\Desktop\Code\Python\Korgan\LearnPythonTheHardWay>
It printed an extra "159." and a newline at the end. Why?
'py' with no arguments:
PS C:\Users\K\desktop\code\Python\Korgan\LearnPythonTheHardWay> py
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>