Week 5 function and code reuse
5.1 definition and use of functions
Use the reserved word def to define the function and lambda to define the anonymous function Optional parameters (initial value), variable parameters (* b), name transfer The reserved word return can return any number of results The reserved word global declaration uses gl ...
Added by jwer78 on Wed, 09 Mar 2022 16:06:40 +0200
Construct program logic
This is a comprehensive exercise of the language elements, branch structure and circular structure learned before.
The title is as follows:
Look for daffodils.
Description: narcissus number is also known as super perfect number. It is a three digit number. The sum of the cubes of the numbers in each digit is exact ...
Added by jaslife on Wed, 09 Mar 2022 15:08:09 +0200
Today's learning objectives:
Understand other built-in methods of using strings Understand and use list built-in methods Understand and supplement knowledge points
Today's learning content:
Other built-in methods for strings (remainder)List built-in methodSupplementary knowledge points
Other built-in methods f ...
Added by Drezard on Wed, 09 Mar 2022 15:08:34 +0200
Detect and remove XSS (cross site scripting) attacks from text entered through normalization.
Cross site scripting (XSS) attacks are a form of threat that exploits vulnerabilities in Web applications to plunder user information. Using malicious scripts, attackers can attract different users through normally trusted Web pages and access any inf ...
Added by triphis on Wed, 09 Mar 2022 14:30:08 +0200
Instead of numpy, use python to judge the median and average of modes in a list
Title: Statisticians want to use a set of functions to determine the median and mode of a list of numbers. The median is the number that appears in the middle after sorting a list. Mode is the number that appears most frequently in the list. These functions are def ...
Added by xdentan on Wed, 09 Mar 2022 12:18:08 +0200
this article will mainly explain the basic theory of Web automated testing in Python, the construction of Webdriver environment and some basic common operations of automated testing. In addition, there is a portal of a series of articles below, which is still being updated. Interested partners can also go to chec ...
Added by moallam on Wed, 09 Mar 2022 10:20:24 +0200
It's said that there are still many small partners who don't know the method of network data collection. Let me see who they are. I'll call the roll without talking. I've shared the tutorial below. If you need it, you can get it yourself. ( https://jq.qq.com/?_wv=1027&k=kYtMeTfp )
Generally, the following four methods can match the resul ...
Added by ozconnect on Wed, 09 Mar 2022 08:35:05 +0200
Official Python column chapter 58, students stop, don't miss this article starting from 0!
This article continues to introduce the classes in threading library, threading Barrier class.
This class is very easy to use. Directly specify the value. By calling its wait method, you can Easily realize synchronous waiting of multiple threads.
Added by diddy1234 on Tue, 08 Mar 2022 23:07:30 +0200
Study notes are for reference only. Mistakes must be corrected
python learning advanced
# Support multi line output
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = 'all' #The default is' last '
Special methods for class objects__ str__ ()
In the interactive interface of py ...
Added by devangel on Tue, 08 Mar 2022 21:43:47 +0200
Use Python requests + selenium to crawl the national recruitment data in Zhilian recruitment. If you read my previous articles, you should know that we have written a crawler that uses selenium to climb Zhilian recruitment
Tip: the following is the main content of this article. The following cases can be used for reference
Added by mikeglaz on Tue, 08 Mar 2022 17:08:15 +0200