1.定义变量:
int_sun = 1
int_sun = int(1)
print(int_sun, type(int_sun))
float_sun = 2.1
float_sun = float(2.1)
print(float_sun, type(float_sun))
complex_sun = 2 + 5j
complex_sun = complex(2, 5)
print(complex_sun, type(complex_sun))
bool_sun = True
bool_sun = False
bool_sun = bool()
bool_sun = bool(True)
bool_sun = bool(False)
print(bool_sun, type(bool_sun))
bytes_sun = b"45"
bytes_sun = bytes(45)
print(bytes_sun, type(bytes_sun))
str_sun = "sun yi tong"
str_sun = str("sun yi tong")
print(str_sun, type(str_sun))
str_sun = str(153)
print(str_sun, type(str_sun))
tuple_sun = (1, 2, 3, 4)
print(tuple_sun, type(tuple_sun))
tuple_sun = tuple()
print(tuple_sun, type(tuple_sun))
tuple_sun = (15, 5.2, True, "string", bytes, None)
print(tuple_sun, type(tuple_sun))
2.list列表:
第一种:Ctrl+鼠标左键 选择 即可得到list源码
第二种:help(XX)即可得到源码
3.字节和字符串转换:
sun = bytes("鸥鹏", encoding='UTF-8')
print(sun, type(sun))
sun1 = sun.decode(encoding='UTF-8')
print(sun1)
4.print函数使用:
print('Hello', end='&')
print('你好', end='&')
print('Bye', end='&')
print('This is Ending')



