python grammar learning notes Task06: dictionaries and collections
1, dictionary
Create dictionary
A dictionary is another variable container model and can store any type of object
Each key value pair of the dictionary is separated by a colon (:), each pair is separated by a comma (,), and the whole dictionary is included in curly braces ({}).
Key must be unique, but ...
Added by snoopgreen on Sun, 27 Oct 2019 10:26:53 +0200
python Basics
python Basics
Following the previous [python foundation]
Explain:
Refer to the series of documents added to the official website: python 3.7
Each part of the code is written to second.py in the same file
Declared variables are public.
The last one is mainly introduction. If you have learned other programming languages, you can understand it ...
Added by wpsd2006 on Wed, 23 Oct 2019 06:13:54 +0300
SICP Exercise Solution Chapter 2
Links to the original text: http://www.cnblogs.com/richard-g/p/3589813.html
Construction of Computer Program and Solution of Explanation Exercises
Structure and Interpretation os Computer Programs Exercises Answer
Chapter 2 Constructing ...
Added by IAK on Sat, 12 Oct 2019 20:35:52 +0300
Spring Source Parsing - bean Creation Process
createBean
protected Object createBean(String beanName, RootBeanDefinition mbd, @Nullable Object[] args)
throws BeanCreationException {
if (logger.isDebugEnabled()) {
logger.debug("Creating instance of bean '" + beanName + "'");
}
RootBeanDefinition mbdToUse = mbd;
// Make sure bean class is actually resolved at this point, and
...
Added by Centrek on Thu, 10 Oct 2019 03:10:09 +0300
Python 3 Advanced Practical Programming Skills
1.1. How to filter data according to conditions in lists
# 1.1.How to filter data according to conditions in lists
data = [-1, 2, 3, -4, 5]
#Screen out data Data larger than or equal to zero in the list
#The first method is not recommended.
res1 = []
for x in data:
if x >= 0:
res1.append(x)
print(res1)
#The se ...
Added by madspof on Sun, 06 Oct 2019 14:15:53 +0300
15 Pythonic code examples
Python because of the simplicity of the language, let us write code in the way of human thinking, novices are easier to start, old birds are more reluctant to let go.
To write Pythonic (elegant, authentic, neat) code, and to observe the Daniel code more often, Github has a lot of excellent source code worth reading, such as: requests, flask, to ...
Added by mabans on Wed, 02 Oct 2019 14:34:34 +0300
Introduction to the Use of Lambda Expressions
Written in front
This paper mainly introduces the use of Lambda expression and functional interface, and does not involve the principle. It is hoped that the beginners can flexibly use Lambda expression programming in daily development after reading it.
Characteristics of Lambda
Java 8 adds a completely new language-level feature called Lambda ...
Added by ruiner17 on Thu, 26 Sep 2019 07:36:29 +0300
Python training camp 45 days - Day04 (function)
Catalog
1. Introduction of Functions
2. Parameters of functions
3. Modules and Functions
4. Recursive function
5. Anonymous functions
6. Multiple Return Values
Python's learning has entered its fourth day. In the previous chapters, we have learned basic variable manipulation ...
Added by adunphy on Thu, 19 Sep 2019 14:44:02 +0300
python ornaments
Decorator concept
Passing a function as an argument to another function returns an alternative version of the function
The way to dynamically add functionality during code execution, called decorators, is essentially a function that returns a function with the purpose of adding functionality to the fu ...
Added by amazing on Thu, 19 Sep 2019 06:25:01 +0300
Expression Tree Practice: Expression Tree Representation of C# Five Operators
Catalog
Expression Tree Practice: C Operators
First, arithmetic operators
+ and Add()
- and Subtract()
Multiplication, division and modularization
Self increasing and decreasing
2. Relational operators
==,!=,>,<,>=,<=
3. Logical Operators
&am ...
Added by deurwaarder on Wed, 18 Sep 2019 16:40:34 +0300