Thu May 11 09:33:00 UTC 2023 inscode

上级 734e5a34
...@@ -2,20 +2,21 @@ ...@@ -2,20 +2,21 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [
"source": [] {
}, "name": "stdout",
{ "output_type": "stream",
"cell_type": "code", "text": [
"execution_count": null, "反转后的字符串为: \n"
"metadata": {}, ]
"outputs": [], }
],
"source": [ "source": [
"string = input(\"请输入一个字符串:\")\n", "string = input(\"请输入一个字符串:\")\n",
"reverse_string = string[::-1]\n", "reverse_string = string[::-1]\n",
"print(\"反转后的字符串为:\", reverse_string)\n" "print(\"反转后的字符串为:\", reverse_string)"
] ]
} }
], ],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册