python learning (1) variable

Variables declared

#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
name = "sage"

The role of variables: the nickname, which refers to the generation of memory stored in an address in content

Variables defined rules:

    • Variable names can be any combination of letters, numbers or underscore
    • The first character variable names can not be digital
    • The following keywords can not be declared variable name
      [ 'and', 'as' ,' assert ',' break ',' class', 'continue', 'def', 'del', 'elif', 'else', ' except ',' exec ',' finally ',' for ',' from ',' global ',' if ',' import ',' in ',' is', 'lambda', 'not', 'or' , 'pass', 'print' , 'raise', 'return', 'try', 'while', 'with', 'yield']

Guess you like

Origin www.cnblogs.com/sage914/p/11571963.html