笨办法学python学习笔记(1~5)
来源:互联网 发布:手机透视衣服软件 编辑:程序博客网 时间:2024/05/16 12:11
按照教程老老实实的敲了python的代码
# -*- coding: utf-8 -*-
print "Hello World!"
print "Hello Again"
print "I like typing this"
print "This is fun."
print "Yay! Printing."
print "I'd much rather you 'you'."
print 'I "said" do not touch this.'
print "another line"
'''
Put a '#' (octothorpe) character at the beginning of a line.
What did it do? Try to find out what this character does.
从官网上找到的答案如下:
Defining the Encoding
Python will default to ASCII as standard encoding if no other
encoding hints are given.
To define a source code encoding, a magic comment must
be placed into the source files either as first or second
line in the file, such as:
# coding=<encoding name>
or (using formats recognized by popular editors)
#!/usr/bin/python
# -*- coding: <encoding name> -*-
or
#!/usr/bin/python
# vim: set fileencoding=<encoding name> :
需要注意的是,#也表示的是单行注释,多行注释用三个单引号开头和结尾
'''
- 笨办法学python学习笔记(1~5)
- 《笨办法学 Python》 学习笔记01
- 《笨办法学 Python》 学习笔记02
- “笨办法学python”学习笔记-习题5
- “笨办法”学python笔记
- 笨办法学python_学习笔记1
- 《笨办法学 Python》 学习笔记04 if-while-for
- 《笨办法学 Python》 学习笔记05 —— Class
- 笨办法学Python学习笔记 练习16
- 笨办法学Python学习笔记 练习17
- 笨办法学Python学习笔记 练习18
- 笨办法学Python学习笔记 练习19
- 笨办法学Python学习笔记 练习21
- 笨办法学Python学习笔记 练习25
- 笨办法学Python学习笔记 练习26
- 笨办法学Python学习笔记 练习32
- “笨办法学python”学习笔记-错误整理
- “笨办法学python”学习笔记-一些附加题
- tellg,tellp,seekp,seekg函数
- 多屏幕多分辨率的支持
- XP和Linux双系统如何修改默认启动的系统
- 恶趣味之小黑版
- Linux系统 C++ 获取网络接口,以及主机网关IP
- 笨办法学python学习笔记(1~5)
- 算法 - 求和为n的连续正整数序列(C++)
- SVN服务端与客户端配置VisualSVN/CollabNet Subversion Edge、TortoiseSVN
- RAS加密
- 王文志:是的.第一次举报时,我已经拿到第二次举报(包养情妇,涉嫌贪腐)的举报资料.这几个月我一直在核实,通过多渠道证实了本次举报内容的真实性.
- Visual C++编程实现摄像头视频捕捉
- Activiti工作流教程 Activiti 5.13 安装入门
- [转]阿里云:从攻到防,深入浅出DDoS
- apache+JK+tomcat负载均衡配置(windows)