File tree Expand file tree Collapse file tree 1 file changed +31
-20
lines changed Expand file tree Collapse file tree 1 file changed +31
-20
lines changed Original file line number Diff line number Diff line change 75
75
},
76
76
{
77
77
"cell_type" : " code" ,
78
- "execution_count" : 6 ,
78
+ "execution_count" : 7 ,
79
79
"id" : " b8781aa4" ,
80
80
"metadata" : {},
81
81
"outputs" : [
82
82
{
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
+ ]
91
88
}
92
89
],
93
90
"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)"
95
96
]
96
97
},
97
98
{
117
118
},
118
119
{
119
120
"cell_type" : " code" ,
120
- "execution_count" : 8 ,
121
+ "execution_count" : 2 ,
121
122
"id" : " 572e8b83" ,
122
123
"metadata" : {},
123
124
"outputs" : [
124
125
{
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
+ ]
133
135
}
134
136
],
135
137
"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 "
137
148
]
138
149
},
139
150
{
You can’t perform that action at this time.
0 commit comments