Play Google

玩转谷歌--学习笔记,成长历程

收藏:图片格式详解

  Gif格式图片的特点:

透明性

Gif是一种布尔透明类型,既它可以是全透明,也可以是全不透明,但是它并没有半透明(alpha 透明)。

动画

    Gif这种格式支持动画......

Python学习笔记(2)

  1. Python中没有 switch case语句,只有if elif else
  2. 字符串、数字、元组是不可变的,改变其值会创建新的对象(这也是为什么大量字符串的拼接会导致效率降低的原因)
  3. 字符串模版(直觉是这个功能做WEB的时候很有用,可以轻易的实现根据模版生成静态页面的功能):
    from string import Template
    s = Template("There are ${test}")
    print s.substitute(test="python")  ==>输出 There are python 
    substitute中参数如果没有对应声明字符串模版中的
    Template 对象还有另外一个方法save_substitute(),该方法在没有声明key的情况下不会报错,直接输出
分页:[«]1[»]

Powered By Z-Blog 1.8 Spirit Build 80605 and theme by Robert.think

Copyright © 2009 PlayGoogle.com. All Rights Reserved.