Python starts from scratch - 06 variable assignment

method one:

counter = 100 # assign an integer variable
miles = 1000.0 # float
name = "John" # string

Method two:

a, b, c = 1, 2, "john"

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325804951&siteId=291194637