Python full-stack Python programming foundation Automation Series (basic grammar)

A first Python program:

1) pritnt function used to print "Hello Python"

 

 

 2) print function default is a newline, if do not want to wrap, can end = "" achieve

 

 

3) print function can print more than what you need to print

Two, python keywords

 

 

Third, the variable naming conventions

1) Variable names may consist of letters, numbers, underscore (_) any combination thereof, can not begin to pay attention to digital

2) variable names can not be used Python keywords, but can contain keywords

3) Variable names can not contain spaces

4) variable names as far as possible see the name EENOW

Fourth, the identifier (all played by our own name is an identifier)

1, specification: identifier made up of letters, numbers, underscores, can not use the keyword

2, case sensitive identifier: a lowercase and uppercase A is not the same

Identifier naming style:

  1) The underlined nomenclature: using underscore between words in lowercase letters, words: Specification

            For example: max_number

  2) large hump nomenclature: Specifications: The first letter of each word capitalized

            For example: MaxNumber

  3) small hump nomenclature: specification: the first word beginning with a lowercase letter, the first letter of the second word capitalized

            For example: maxNumber

Five, input console input

a data acquisition function is input from the console inside are acquired type string ( remember! )

 

 

Guess you like

Origin www.cnblogs.com/bluesea-zl/p/12114587.html