001、
>>> test1 = "100 200" ## test1为字符串 >>> test1 '100 200' >>> a,b = test1.split() ## 拆分字符串,直接赋值给变量名 >>> a '100' >>> b '200' >>> test2 = [500, 1000] ## test2为列表 >>> x,y = test2 ## 将列表的元素直接赋值给变量名 >>> x 500 >>> y 1000
标签:test1,200,test2,python,##,变量名,赋值 From: https://www.cnblogs.com/liujiaxin2018/p/16585701.html