提交 fbfdc711 编写于 作者: 秦英杰

fix:数据容器

上级 873a41a6
......@@ -4,32 +4,10 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="a58667c7-f41c-4f13-881e-dc86f57d3cdc" name="Changes" comment="fix:列表">
<change afterPath="$PROJECT_DIR$/06_数据容器/01-列表/02_列表的取值.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/06_数据容器/01-列表/04_值的索引.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/06_数据容器/01-列表/05_修改列表值.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/06_数据容器/01-列表/06_列表新增.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/06_数据容器/01-列表/07_列表删除.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/06_数据容器/01-列表/08_列表长度.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/06_数据容器/01-列表/09_列表反转.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/06_数据容器/04-集合/12_集合课后练习.py" afterDir="false" />
<list default="true" id="a58667c7-f41c-4f13-881e-dc86f57d3cdc" name="Changes" comment="fix:列表整理">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/01-列表/01_list列表.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/01-列表/01_列表定义.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/01-列表/02_list列表的常用操作.py" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/01-列表/02_list删除.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/01-列表/03_列表删除.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/01-列表/03_list列表常用操作课后练习.py" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/01-列表/05_list列表的循环.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/01-列表/10_列表遍历.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/01-列表/test.py" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/01-列表/test_01.py" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/01-列表/test_02.py" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/02-元组/05_tuple元组.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/03-元组/05_tuple元组.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/03-字符串/06_字符串.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/02-字符串/06_字符串.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/03-字符串/07_字符串课后练习.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/02-字符串/07_字符串课后练习.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/03-字符串/16_字符串大小比较.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/02-字符串/16_字符串大小比较.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/04-集合/10_集合.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/04-集合/10_集合.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/04-集合/11_集合课后练习.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/04-集合/11_集合课后练习.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/05-字典/12_字典.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/05-字典/12_字典.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/05-字典/13_字典的常用操作.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/05-字典/13_字典的常用操作.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/01_序列和切片.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/01_序列和切片.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/06_数据容器/02_序列切片课后练习.py" beforeDir="false" afterPath="$PROJECT_DIR$/06_数据容器/02_序列切片课后练习.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -56,8 +34,10 @@
"Python.01_list列表.executor": "Debug",
"Python.01_list删除.executor": "Debug",
"Python.01_while循环练习题_求1-100的和.executor": "Debug",
"Python.01_序列和切片.executor": "Debug",
"Python.02_list列表的常用操作.executor": "Debug",
"Python.02_列表的取值.executor": "Debug",
"Python.02_序列切片课后练习.executor": "Debug",
"Python.03_while循环的基础案例-猜数字.executor": "Debug",
"Python.04_值的索引.executor": "Debug",
"Python.05_tuple元组.executor": "Debug",
......@@ -95,7 +75,7 @@
"Python.test_06.executor": "Debug",
"RunOnceActivity.ShowReadmeOnStart": "true",
"git-widget-placeholder": "main",
"last_opened_file_path": "/Users/qinyingjie/Documents/python-workspace/python-demo/06_数据容器/01-列表",
"last_opened_file_path": "/Users/qinyingjie/Documents/python-workspace/python-demo/06_数据容器/02-字符串",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
......@@ -107,11 +87,11 @@
}]]></component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/06_数据容器/02-字符串" />
<recent name="$PROJECT_DIR$/06_数据容器/01-列表" />
<recent name="$PROJECT_DIR$/06_数据容器/04-集合" />
<recent name="$PROJECT_DIR$/05_函数进阶" />
<recent name="$PROJECT_DIR$/04_函数" />
<recent name="$PROJECT_DIR$/01_Python入门语法" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/06_数据容器/01-列表" />
......@@ -121,8 +101,8 @@
<recent name="$PROJECT_DIR$/06_数据容器/02-元组" />
</key>
</component>
<component name="RunManager" selected="Python.test_01">
<configuration name="05_修改列表值" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<component name="RunManager" selected="Python.02_序列切片课后练习">
<configuration name="01_序列和切片" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="python-demo" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
......@@ -131,12 +111,12 @@
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/06_数据容器/01-列表" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/06_数据容器" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/06_数据容器/01-列表/05_修改列表值.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/06_数据容器/01_序列和切片.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
......@@ -145,7 +125,7 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="06_列表新增" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<configuration name="02_序列切片课后练习" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="python-demo" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
......@@ -154,12 +134,12 @@
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/06_数据容器/01-列表" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/06_数据容器" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/06_数据容器/01-列表/06_列表新增.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/06_数据容器/02_序列切片课后练习.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
......@@ -191,29 +171,6 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="12_字典" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="python-demo" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/06_数据容器/05-字典" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/06_数据容器/05-字典/12_字典.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="test" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="python-demo" />
<option name="ENV_FILES" value="" />
......@@ -262,11 +219,11 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.02_序列切片课后练习" />
<item itemvalue="Python.01_序列和切片" />
<item itemvalue="Python.test_01" />
<item itemvalue="Python.test" />
<item itemvalue="Python.07_列表删除" />
<item itemvalue="Python.06_列表新增" />
<item itemvalue="Python.05_修改列表值" />
</list>
</recent_temporary>
</component>
......@@ -294,7 +251,11 @@
<workItem from="1722328396797" duration="4110000" />
<workItem from="1722344280913" duration="5737000" />
<workItem from="1722355460112" duration="57000" />
<workItem from="1722356731871" duration="821000" />
<workItem from="1722356731871" duration="4887000" />
<workItem from="1722829089466" duration="163000" />
<workItem from="1722829257290" duration="3000" />
<workItem from="1722958099322" duration="648000" />
<workItem from="1723121743484" duration="297000" />
</task>
<task id="LOCAL-00001" summary="fix:基础语法">
<option name="closed" value="true" />
......@@ -368,7 +329,23 @@
<option name="project" value="LOCAL" />
<updated>1722344289002</updated>
</task>
<option name="localTasksCounter" value="10" />
<task id="LOCAL-00010" summary="fix:列表整理">
<option name="closed" value="true" />
<created>1722357564336</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1722357564336</updated>
</task>
<task id="LOCAL-00011" summary="fix:列表整理">
<option name="closed" value="true" />
<created>1722357967372</created>
<option name="number" value="00011" />
<option name="presentableId" value="LOCAL-00011" />
<option name="project" value="LOCAL" />
<updated>1722357967372</updated>
</task>
<option name="localTasksCounter" value="12" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -382,13 +359,14 @@
<MESSAGE value="fix:修改顺序" />
<MESSAGE value="fix:添加注释" />
<MESSAGE value="fix:列表" />
<option name="LAST_COMMIT_MESSAGE" value="fix:列表" />
<MESSAGE value="fix:列表整理" />
<option name="LAST_COMMIT_MESSAGE" value="fix:列表整理" />
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/python_demo$10_.coverage" NAME="10_集合 Coverage Results" MODIFIED="1722348503862" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/06_数据容器/04-集合" />
<SUITE FILE_PATH="coverage/python_demo$01_list.coverage" NAME="01_list删除 Coverage Results" MODIFIED="1722089335773" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/05_数据容器" />
<SUITE FILE_PATH="coverage/python_demo$test_06.coverage" NAME="test_06 Coverage Results" MODIFIED="1722331841870" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/05_函数进阶" />
<SUITE FILE_PATH="coverage/python_demo$02_.coverage" NAME="02_列表的取值 Coverage Results" MODIFIED="1722357127914" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/06_数据容器/01-列表" />
<SUITE FILE_PATH="coverage/python_demo$02_.coverage" NAME="02_序列切片课后练习 Coverage Results" MODIFIED="1723121883085" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/06_数据容器" />
<SUITE FILE_PATH="coverage/python_demo$06_.coverage" NAME="06_字符串 Coverage Results" MODIFIED="1722356944560" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/06_数据容器/02-字符串" />
<SUITE FILE_PATH="coverage/python_demo$05_tuple.coverage" NAME="05_tuple元组 Coverage Results" MODIFIED="1722347989141" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/06_数据容器/03-元组" />
<SUITE FILE_PATH="coverage/python_demo$09_.coverage" NAME="09_变量作用域 Coverage Results" MODIFIED="1722328865411" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/03_Python循环语句" />
......@@ -406,6 +384,7 @@
<SUITE FILE_PATH="coverage/python_demo$07_.coverage" NAME="07_列表删除 Coverage Results" MODIFIED="1722357394780" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/06_数据容器/01-列表" />
<SUITE FILE_PATH="coverage/python_demo$test_05.coverage" NAME="test_05 Coverage Results" MODIFIED="1722087939711" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/06_函数进阶" />
<SUITE FILE_PATH="coverage/python_demo$test_02.coverage" NAME="test_02 Coverage Results" MODIFIED="1722332646298" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/06_数据容器" />
<SUITE FILE_PATH="coverage/python_demo$01_.coverage" NAME="01_序列和切片 Coverage Results" MODIFIED="1723121844038" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/06_数据容器" />
<SUITE FILE_PATH="coverage/python_demo$06_for_a.coverage" NAME="06_for循环练习题-数一数有几个a Coverage Results" MODIFIED="1721556053815" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/03_Python循环语句" />
<SUITE FILE_PATH="coverage/python_demo$13_.coverage" NAME="13_字典的常用操作 Coverage Results" MODIFIED="1722349584295" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/06_数据容器/05-字典" />
<SUITE FILE_PATH="coverage/python_demo$10_for.coverage" NAME="10_for循环打印九九乘法表 Coverage Results" MODIFIED="1721556392784" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/03_Python循环语句" />
......
......@@ -20,6 +20,7 @@ print(f"结果4:{result4}")
# 对列表进行切片,从3开始,到1结束,步长-1
my_list = [0, 1, 2, 3, 4, 5, 6]
result5 = my_list[3:1:-1]
# result5 = my_list[3:1:1]
print(f"结果5:{result5}")
# 对元组进行切片,从头开始,到尾结束,步长-2
my_tuple = (0, 1, 2, 3, 4, 5, 6)
......
......@@ -6,6 +6,7 @@ my_str = "万过薪月,员序程马黑来,nohtyP学"
# 倒序字符串,切片取出
result1 = my_str[::-1][9:14]
print(f"方式1结果:{result1}")
# 切片取出,然后倒序
result2 = my_str[5:10][::-1]
print(f"方式2结果:{result2}")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册