From b410b781ee2dd576b6db13c0ac5a357a4aa93b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=85=A8=E8=89=AF=E5=A4=9A?= <1303184222@qq.com> Date: Mon, 29 Mar 2021 21:15:22 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E7=AC=AC=E4=BA=94=E5=91=A8=E8=AF=BE?= =?UTF-8?q?=E5=A0=82=E6=B5=8B=E8=AF=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...7\276\345\240\202\346\265\213\350\257\225" | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 "\347\254\254\344\272\224\345\221\250\350\257\276\345\240\202\346\265\213\350\257\225" diff --git "a/\347\254\254\344\272\224\345\221\250\350\257\276\345\240\202\346\265\213\350\257\225" "b/\347\254\254\344\272\224\345\221\250\350\257\276\345\240\202\346\265\213\350\257\225" new file mode 100644 index 0000000..d22015a --- /dev/null +++ "b/\347\254\254\344\272\224\345\221\250\350\257\276\345\240\202\346\265\213\350\257\225" @@ -0,0 +1,28 @@ +Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32 +Type "help", "copyright", "credits" or "license()" for more information. +>>> list=["坦克","战士","法师"] +>>> list +['坦克', '战士', '法师'] +>>> list insert(0,"刺客") +SyntaxError: invalid syntax +>>> list.insert(0,"刺客") +>>> list +['刺客', '坦克', '战士', '法师'] +>>> list.insert(0,"刺客") +>>> lis +Traceback (most recent call last): + File "", line 1, in + lis +NameError: name 'lis' is not defined +>>> list +['刺客', '刺客', '坦克', '战士', '法师'] +>>> list.remove("刺客") +>>> list +['刺客', '坦克', '战士', '法师'] +>>> list.remove("刺客") +>>> list +['坦克', '战士', '法师'] +>>> list[1:3]=["辅助","法师"] +>>> list +['坦克', '辅助', '法师'] +>>> \ No newline at end of file -- Gitee