zoukankan      html  css  js  c++  java
  • 变量-变量名只能是字母、数字或者下划线的任意组合 变量名的第一个字符不能是数字

    创建一个项目:

    选定你想选用的python的版本

    创建一个目录

    创建一个python文件:

     配置每个python文件的默认头

    # !/usr/bin/env python
    # -*- coding:utf-8 -*-
    # Author:lzd
    print("hello world")

    name = "Alex Li"
    print("My name is",name)

    name = "Alex Li"
    name2 = name
    print("My name is", name, name2)
    name = "paoche ge"
    print(name,name2)

    变量名只能是字母、数字或者下划线的任意组合
    变量名的第一个字符不能是数字
    以下关键字不能声明为变量名

    ____name也可以作为变量,任意下划线开头可以作为变量

    建议变量的写法gf_of_oldboy,老男孩的女朋友

    或者GfOfOldboy

    如果你想表示一个常量,那么所有的变量英文字母用大写来表示,比如

    PIE = "123"

    
    
  • 相关阅读:
    springmvc
    POJ 3683 Priest John's Busiest Day
    POJ 3678 Katu Puzzle
    HDU 1815 Building roads
    CDOJ UESTC 1220 The Battle of Guandu
    HDU 3715 Go Deeper
    HDU 3622 Bomb Game
    POJ 3207 Ikki's Story IV
    POJ 3648 Wedding
    HDU 1814 Peaceful Commission
  • 原文地址:https://www.cnblogs.com/itfat/p/7265059.html
Copyright © 2011-2022 走看看