The study of literation in Python(20170911)
来源:互联网 发布:招网络分销方案 编辑:程序博客网 时间:2024/05/17 01:38
The study of literation in Python(20170911)
number = {1,2,3,4} # this is dict
for k in number:# the literation function in Python
print(k)
char = ‘abcd’
for key in char:
print(key)
the enumerate() function can change the list to the index-element
example
for i,value in enumerate([‘a’,’b’,’c’]):
print(i,value)# 0 a, 1 b, 2 c
for x,y in [(1,2),(2,3),(3,4)]:
print(x,y)
阅读全文
0 0
- The study of literation in Python(20170911)
- The study of slice in Python(20170911)
- The study of List Comprehensions in Python(20170911)
- The study of loop in Python(20170906)
- The study of generator in Python(20170912)
- The study of parameter of function in Python(20170908)
- The study of calling fuction in Python(20170907)
- The study of recursive function in Python(20170910)
- The study of iterator in Python(20170912)
- The study of Higher-order function in Python(20170913)
- The study of map() and reduce() function in Python(20170913)
- The study of Class and Instance in Python(20170918)
- The study of access restriction in Python(20170920) 访问限制
- The study of list ,tuple and conditional statement in Python(20170905)
- The study of how to define a function in Python(20170907)
- [2010-VLDB] The Performance of MapReduce: An In-depth Study
- [2010-VLDB] The Performance of MapReduce: An In-depth Study
- The study dict and set in Python(20170906)
- AngularJS Bootstrap
- SVN创建分支/合并分支/切换分支
- listView的header的宽高的解析问题
- 杭电1001
- Android TV RecyclerView 焦点处理及获取焦点的Item保持在中间
- The study of literation in Python(20170911)
- Python 装饰器记录总结 (终极版)
- 锁机制 CLH锁和MCS锁
- [ACM] 常数和语言基础
- Ubuntu 16.0.4环境下GTK3.0的安装,测试及错误解决
- 在数组 arr 末尾添加元素 item。不要直接修改数组 arr,结果返回新的数组
- laravel ORM 只开启created_at的几种方法
- Integer == 的使用
- 《Python编程:从入门到实践》第11章 笔记