查看Python笔记的源代码
←
Python笔记
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== Quick Start == Install python2.7 from https://www.python.org/downloads/ Install pip: <source lang=bash> $ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py $ sudo python get-pip.py </source> <br><br> == Basics == === Numbers === <source lang=python> Python 2.7.9 (default, Mar 1 2015, 12:57:24) >>> a = 3.23 >>> b = 4 >>> c = 52.3E-4 >>> print a, b, c 3.23 4 0.00523 </source> <br> === Strings === <source lang=python> #!/usr/bin/python name ='Jack Tan' if name.startswith('Ja'): print("Yes, name start with 'Ja'") if 'a' in name: print('Yes, name contains the string "a"') if name.find('ac') != -1: print('Yes, name contains the string "ac"') deli = '_*_' mylist = ['Brazil', 'Russia', 'India', 'China'] print(deli.join(mylist)) </source> Output: <source lang=bash> Yes, name start with 'Ja' Yes, name contains the string "a" Yes, name contains the string "ac" Brazil_*_Russia_*_India_*_China </source> <br><br> == Operators == <br><br> == Control Flow == <br><br> == Functions == <br><br> == Data Structures == <br><br> == Exceptions == <br><br> == Modules == <br><br> == Object Oriented == <br><br> == Resource == * Online Python: http://www.compileonline.com/execute_python_online.php * Python Quick Start: http://www.tutorialspoint.com/python/python_lists.htm <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br>
返回到
Python笔记
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面