一行一步一花新:python-0

来源:互联网 发布:linux udp服务器 编辑:程序博客网 时间:2024/06/11 23:50
Powershell中: 命令cd\直接回到根目录
              再输入d:可到D盘
              再输入python 文件夹/文件.py
              即可编译出结果
Python3输入字符串时不讲究单引号双引号(单引双引不能混合使用),但要加小括号,python2不用加小括号
摘自鲁上客的博客:
问题:
print "hello" SyntaxError: Missing parentheses in call to 'print'
解决:
python3取消了这种用法。使用 print("hello"),这种来输出。
python3 语法 和 python2 已经变得有些差别了。
python3中,去除了print语句,加入print()函数实现相同的功能。 


备注:parentheses :parenthesis的名词复数, 圆括号,插入语,插曲;
0 0