单个赋值: x=42
多个赋值: x, y, z = 1, 2, 'jiajintao'
单个打印: print x
多个打印: print x, y, z
#coding=utf-8
#列表list
text = 'hello,word'
print list(text)
结果:['h', 'e', 'l', 'l', 'o', ',', 'w', 'o', 'r', 'd']
text_list = list(text)
print text_list
结果:['h', 'e', 'l', 'l', 'o', ',', 'w', 'o', 'r', 'd']
#list转字符串text = ''.join(text_list)
print text
#结果:hello,wor
print '/'.join(text_list)
#结果:h/e/l/l/o/,/w/o/r/d
lists = ['jiajintao', 'sunhonglei', 'zhaoliyin', 'caiyilin']
#打印单个值
print lists[2]
#结果:zhaoliyin
#打印整个list
print lists[:], lists
#结果:['jiajintao', 'sun