day12 function advanced
day12 function advanced
1. Anonymous function
(1) Anonymous function
Syntax: function name = lambda parameter list: return value Equivalent to: def function name (parameter list) Return return value Note: anonymous functions can only implement functions that can be completed in one sentence of code Anonymous functions are no different fro ...
Added by pakmannen on Mon, 10 Jan 2022 18:06:50 +0200
Python Basics
Fundamentals of Python language
Python syntax features
notes
Single-Line Comments #As a single line comment symbol, from # beginning to line feed, all the contents behind it are ignored by the Python compiler as the contents of comments
multiline comment
'''
Note content 1
Note content 2
'''
# perhaps
"""
Note content 1
Note conten ...
Added by Mobile on Mon, 10 Jan 2022 17:56:22 +0200
Learning python packages and modules
Here are my own experiments and excerpts from books
Note that the explanation given in the third paragraph above may be a little confused, simply put__ doc__ Only the first string can be output (the following "the first line... The second line is an empty line..." refers to a multi line string, which is wrapped in three quotation ...
Added by john_nyc on Mon, 10 Jan 2022 15:53:58 +0200
10 Python efficient programming tips!
When you first know Python language, you feel that Python meets all the requirements for programming language when you go to school. The efficient programming skills of Python language make those who have been forced to learn c or c + + for four years excited and finally relieved. High level language, if you can't do this, what's high level?01 ...
Added by evildobbi on Mon, 10 Jan 2022 15:07:50 +0200
Fundamentals of Python
1. Iteration1.1 concept of iterationThe process of using the for loop to traverse the value is called iteration. For example, the process of using the for loop to traverse the list to obtain the valuefor value in [2, 3, 4]:
print(value)1.2 iteratable objectsStandard concept: defined in class__ iter__ Method, and the object created using thi ...
Added by alpha_juno on Mon, 10 Jan 2022 10:58:51 +0200
It's said that people earn 100000 a month in violation of regulations? I wrote an automatic detection system to check whether the vehicle is illegal
Introduction
Xiaobian hasn't updated these days! Because I don't have time to practice car test simulation ~ it's been a long time since I started learning to practice car today.
Last night, I was still nervous and fell asleep slowly. I ran to the examination site early in the morning and waited for several hours. long long ago......
Th ...
Added by johnsiilver on Mon, 10 Jan 2022 10:04:03 +0200
Analysis of Guangzhou real estate market with Python
Hello, I'm Charlie. I haven't been more polite for a while. I apologize to my friends who pay attention to me. This time, I want to use Python to analyze the data for Guangzhou in combination with the real estate business, in order to provide you with some analysis ideas. Why analyze the real estate market? The real estate industry has distinct ...
Added by venom999 on Mon, 10 Jan 2022 10:02:13 +0200
Four common data structures in standard library collections
collections library is a part of the standard library. There are many data structures in it. Many modifications and improvements have been made on the basis of lists, dictionaries and tuples.Let's talk about the most useful ones today.1,dequeIt implements a queue that can be operated at both ends, which is equivalent to a double ended queue. It ...
Added by steply on Mon, 10 Jan 2022 08:31:16 +0200
Python learning notes: 6 bad habits of code performance
1, Background
There are often many different ways to achieve a data requirement, but there are still some differences in speed after all.
2, Bad habits
1. Do not import the root directory
Whether it is a built-in module or a third-party module, it must be imported before use.
If we only need some of these functions, we can import them separatel ...
Added by jaz529 on Mon, 10 Jan 2022 06:06:49 +0200
Python in depth training notes IV
catalogue
1, Semaphore
1. What is a semaphore?
2. How?
2, Conditional variable
1. What are conditional variables?
2. How?
3, Events
1. What is an event?
2. How?
1, Semaphore
1. What is a semaphore?
Semaphore is an abstract data type managed by the operating system, which is used to synchronize the use of shared resources in m ...
Added by GRUMBLE on Mon, 10 Jan 2022 04:58:29 +0200