8000 updated · sru0309/python_practices@d78cf0d · GitHub
[go: up one dir, main page]

Skip to content

Commit d78cf0d

Browse files
committed
updated
1 parent 43d0926 commit d78cf0d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

002-basic-string-program.ipynb

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,32 @@
448448
"print(\"string after:\",res) "
449449
]
450450
},
451+
{
452+
"cell_type": "code",
453+
"execution_count": 1,
454+
"metadata": {},
455+
"outputs": [
456+
{
457+
"name": "stdout",
458+
"output_type": "stream",
459+
"text": [
460+
"string before: python is a programming language\n",
461+
"string after: PthN IS AA PogrammiG LnguaE\n"
462+
]
463+
}
464+
],
465+
"source": [
466+
"n = \"python is a programming language\"\n",
467+
"print(\"string before:\",n)\n",
468+
"a =n.split(' ')\n",
469+
"res =[]\n",
470+
"for i in a:\n",
471+
" x =i[0].upper()+i[2:-2]+i[-1].upper()\n",
472+
" res.append(x)\n",
473+
"res=' '.join(res)\n",
474+
"print(\"string after:\",res)"
475+
]
476+
},
451477
{
452478
"cell_type": "code",
453479
"execution_count": null,

0 commit comments

Comments
 (0)
0