Lecture 7_1: Lists and mutability, dictionaries, pseudocode, introduction to efficiency
来源:互联网 发布:阿里云cdn加速如何使用 编辑:程序博客网 时间:2024/05/17 01:56
# example code, Lecture 7, Fall 2008def showDicts(): EtoF = {'one': 'un', 'soccer': 'football', 'never': 'janaie'} print (EtoF['soccer']) input()# print (EtoF[0]) #Dictionary is not order. print (EtoF) input() NtoS = {1: 'one', 2:'two', 'one':1, 'two':2 } print (NtoS) print (NtoS.keys()) input() print (NtoS.keys) input() del NtoS['one'] print (NtoS) input()def Dicts(): dic = {'a':1, 'b':2} print (dic) print (dic['a']) list1 = dic.keys() print (list1) list2 = dic.values() print (list2)
阅读全文
0 0
- Lecture 7_1: Lists and mutability, dictionaries, pseudocode, introduction to efficiency
- Lecture 7_2: Lists and mutability, dictionaries, pseudocode, introduction to efficiency
- Lecture 6: Bisection methods, Newton/Raphson, introduction to lists
- Python学习笔记(7)Mouse Input, More Lists and Dictionaries
- Lecture 9: Mutability & Immutability
- Lecture 4: Decomposition and abstraction through functions; introduction to recursion
- Python 入门教程 8 ---- Python Lists and Dictionaries
- Python学习——Lists and Dictionaries
- 6.00 Introduction to Computer Science and Programming Lec 8: Efficiency and Order of Growth
- Introduction to Access Lists
- 6.00 Introduction to Computer Science and Programming Lec 9: Lecture 9: Memory and Search Methods
- Introduction to Linear Algebra Lecture 1
- An Introduction to Python Lists
- An Introduction to Python Lists
- Sorting Lists of Dictionaries
- 【CS231n winter2016 Lecture 4 (Backpropagation ,Introduction to neural networks)】
- CS 20SI|Lecture 1 Introduction to TensorFlow
- Lecture note 1: Introduction to TensorFlow(斯坦福Tensorflow课程)
- 重新开始写字的一点感想
- Lecture 6: Bisection methods, Newton/Raphson, introduction to lists
- C++ const 的使用
- Hadoop分布式集群搭建
- 数组、链表、堆栈和队列
- Lecture 7_1: Lists and mutability, dictionaries, pseudocode, introduction to efficiency
- linux系统编程-epoll
- 数组和链表的区别
- String & Date
- mybatis入门基础(三)----SqlMapConfig.xml全局配置文件解析
- [LeetCode][2 Add Two Numbers][medium]Java实现
- HDFS文件系统和元数据合并流程以及namenode启动流程
- [4]54. Spiral Matrix/59. Spiral Matrix II(Java)
- 使用Lamdba 表达式 从A集合中去除不存在于B集合的元素加入到C集合中(快速找出两个集合中不同的元素)