对比两者的区别

    1. x = 'spam'
    2. while True:
    3. print(x)
    4. x = x[1:]
    1. x = 'spam'
    2. while x:
    3. print(x)
    4. x = x[1;]