All of the variables used in previous chapters held one value. That value could be an integer, a Boolean, a string, or a value of some other type. While using one variable for each value is practical for small problems, it quickly becomes untenable when working with larger amounts of data. Lists overcome this problem by allowing several, even many, values to be stored in one variable.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Lists

  • Ben Stephenson

摘要

All of the variables used in previous chapters held one value. That value could be an integer, a Boolean, a string, or a value of some other type. While using one variable for each value is practical for small problems, it quickly becomes untenable when working with larger amounts of data. Lists overcome this problem by allowing several, even many, values to be stored in one variable.