zoukankan      html  css  js  c++  java
  • 变量

    变量的作用:

    Variables are uesd to store  information to be  referenced  and  manipulated in a computer . they also provide a way  of labeling data with a descriptive name, so our programs can be understood  more clearly by the reader and ourselves. it is helpful to think  of variablese as containers that hold  information their  sole  purpose is to label and store  data in memory this data can then be uesd throughout your  program

    声明变量:

    name = "alex"

    name为变量名

    alex为变量值

    定义变量的规则:

    变量名只能是 字母,数字 下划线的任意组合;

    变量名的第一个字符不能是数字;

    python中的语法不能作为变量命,如:print an in 等等

    约定俗成的固定:

    变量名不能用中文;

    变量名不能用拼英;

    变量名不能过长;

    变量名不能词不达意

    常量:

    python中没有常量的固定语法,和变量形式一样,约定俗成将变量名全部大写视为常量。

  • 相关阅读:
    stty
    ping
    read
    echo
    grep
    date
    vi与vim编辑器使用
    rename
    netstat
    input输入框的背景图片也可以这样玩
  • 原文地址:https://www.cnblogs.com/aaaajayheng1990/p/8628915.html
Copyright © 2011-2022 走看看