1, Python language features

1, python is sequentially executed according to the language

def count1():
    print("this is count1")
    count2()

count1()

def count2():
    print("this is count2")

The results are:

NameError: name 'count2' is not defined

2, the basic data types

int----str----bool----list----float

Note: string converted to type bool

bool("True")
True

bool("False")
True

bool("hello")
True

bool("")
False

bool(0)
False

Guess you like

Origin www.cnblogs.com/Stephanie-boke/p/11711313.html