Python: Naming Variables

Python: Naming Variables

  1. only use ordinary letters, numbers, or underscores in variable names
  2. need to start with a letter or underscore
table6
table_6

can’t use reserved words or built-in identifiers

这里写图片描述

pythonic way to name variables is to use all lowercase letters and underscores to separate words, called snake case.

my_height = 170
my_lat = 40
my_long = 100

猜你喜欢

转载自blog.csdn.net/guo_ya_nan/article/details/80262042