最小的是字符串
最大的是字典
# -*- coding: utf-8 -*-
"""
@Time : 2022/10/21 16:44
@Author : JackXia
@Email : 915624876@qq.com
@QQ : 915624876
@File : python列表 元祖 集合创建的开销.py
@Software: PyCharm
"""
query_column1 = list()
query_column2 = tuple()
query_column3 = set()
query_column4 = dict()
query_column5 = str()
if __name__ == '__main__':
import sys
print('list: ', sys.getsizeof(query_column1)) # list: 36
print('tuple: ', sys.getsizeof(query_column2)) # tuple: 28
print('set: ', sys.getsizeof(query_column3)) # set: 116
print('dict: ', sys.getsizeof(query_column4)) # dict: 136
print('str: ', sys.getsizeof(query_column5)) # str: 25