Skip to content

Commit 26fba64

Browse files
committed
update
1 parent 3390e52 commit 26fba64

File tree

1 file changed

+31
-20
lines changed

1 file changed

+31
-20
lines changed

Python - Fundamentals.ipynb

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,24 @@
7575
},
7676
{
7777
"cell_type": "code",
78-
"execution_count": 6,
78+
"execution_count": 7,
7979
"id": "b8781aa4",
8080
"metadata": {},
8181
"outputs": [
8282
{
83-
"data": {
84-
"text/plain": [
85-
"'Welcome To India'"
86-
]
87-
},
88-
"execution_count": 6,
89-
"metadata": {},
90-
"output_type": "execute_result"
83+
"name": "stdout",
84+
"output_type": "stream",
85+
"text": [
86+
"True False\n"
87+
]
9188
}
9289
],
9390
"source": [
94-
"s.title()"
91+
"a = 'e' in 'hello'\n",
92+
"\n",
93+
"b = 'e' not in 'hello'\n",
94+
"\n",
95+
"print(a,b)"
9596
]
9697
},
9798
{
@@ -117,23 +118,33 @@
117118
},
118119
{
119120
"cell_type": "code",
120-
"execution_count": 8,
121+
"execution_count": 2,
121122
"id": "572e8b83",
122123
"metadata": {},
123124
"outputs": [
124125
{
125-
"data": {
126-
"text/plain": [
127-
"4"
128-
]
129-
},
130-
"execution_count": 8,
131-
"metadata": {},
132-
"output_type": "execute_result"
126+
"name": "stdout",
127+
"output_type": "stream",
128+
"text": [
129+
"str = welcome to india\n",
130+
"str[0] = w\n",
131+
"str[-1] = a\n",
132+
"str[1:5] = elco\n",
133+
"str[5:-2] = me to ind\n"
134+
]
133135
}
134136
],
135137
"source": [
136-
"s.find('o')"
138+
"str = 'welcome to india'\n",
139+
"print('str = ', str)\n",
140+
"\n",
141+
"print('str[0] = ', str[0])\n",
142+
"\n",
143+
"print('str[-1] = ', str[-1])\n",
144+
"\n",
145+
"print('str[1:5] = ', str[1:5])\n",
146+
"\n",
147+
"print('str[5:-2] = ', str[5:-2])\n"
137148
]
138149
},
139150
{

0 commit comments

Comments
 (0)