python basic learning 11 ---- functions
1, Definition of function
def function name (parameter list):
Function body
return statement
Return statement without writing or adding any object after it is return None
2, Parameters of function
No parameter
def func1():
print("No parameters")
One parameter
def func1(a):
return a
Multiple parameters
def func1(a,b,c):
...
Posted by kelseyirene on Thu, 02 Jan 2020 20:59:44 -0800
grep of linux regular expression
Regular expression is the way to deal with strings. It can perform specific character handlers such as find, delete, and replace.
Common commands grep, awk, sed
[: alunm:] represents English case characters and numbers, i.e. 0-9 A-Z a-z
[: alpha:] represents any English case letter A-Z A-Z
[: blank:] represents the space b ...
Posted by cuteflower on Wed, 01 Jan 2020 02:07:59 -0800
Android development sets various properties of linear layout and relative layout RelativeLayout in the code
1. In the first case, I do not define the xml layout file at all. The layout file is completely written in the Java file. The code is as follows:
import android.annotation.SuppressLint;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import and ...
Posted by Cateyes on Sun, 01 Dec 2019 13:50:18 -0800
04-tkinter's Entry Notes
Text box Entry is usually a single-line text box in the following format:Entry (parent object, options,...)
Common options parameters:
bg or background: Background color.
borderwidth or bd: The boundary width, which defaults to 2 pixels.
command: this function is automatically executed when the user changes the content.
cursor: The shape of th ...
Posted by webbnino on Sat, 16 Nov 2019 18:12:40 -0800
Git Branch Management - Create, Merge, Delete Branches
Preface:
Almost all version control supports branching in some way.Using branching means that you can separate your work from the development main line, so as not to affect it.
Git's branching model is known as its "must-kill" feature, which makes Git stand out from many version control systems.Git handles branches incredibly lightwe ...
Posted by PURU on Thu, 14 Nov 2019 14:17:44 -0800
[advanced search] chivalry
Title Link
Solving problems
There are many ways to solve this problem.
First of all, let's think about it. If it's more than 15, it will output - 1. Then let's find the minimum value. Obviously. It can be done with iteration deepening.
We can enumerate the minimum steps directly.
But that's only 20 points... You know, if t ...
Posted by DanielHardy on Wed, 13 Nov 2019 07:27:22 -0800
Python(day.5 function and Lambda expression)
function
To create a function, the keyword del is used, followed by a colon and its executor.
>>>del MyFirstFunction():
print('hello')
print('world')
print('!')
>>>MyFirstFunction()
hello
world
!
Parameters of function
When calling a function, the parameter position should b ...
Posted by designxperts on Sat, 26 Oct 2019 08:08:38 -0700
centos7 installs MySQL 5.17 online and configures remote access
Environmental Science:
centos7
mysql5.7Installation: Official Yum RepositoryOther notes:
If you need to install other versions, please switch rpm version by yourself. This installation version is 57, that is, the asterisk position is "57".
After MySQL 5.7, the password policy does not allow w ...
Posted by shawngibson on Tue, 01 Oct 2019 12:36:42 -0700
[Chapter 9] Functions of python
Introduction of Functions
Functions are organized, reusable code segments that implement a single, or related function.
Functions can improve the modularity of applications and the reuse of code. You already know that Python provides many built-in functions, such as print(). But you can also create your own functions, which are called user-de ...
Posted by Mega on Mon, 09 Sep 2019 02:10:55 -0700
Regular expressions (base and extension)
grep and sed support basic regular expressions in common file processing tools on Linux systems.
grep - Regularly expresses commands to filter file contents.
Options:
-i: case insensitive when searching;
-v: reverse search, showing all columns that do not meet the search criteria;
-n: Display the line number of the output;
-A: You can append ...
Posted by nyfael on Fri, 23 Aug 2019 21:11:18 -0700