File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change 1152
1152
]
1153
1153
},
1154
1154
{
1155
- "cell_type" : " code" ,
1156
- "execution_count" : 1 ,
1155
+ "cell_type" : " markdown" ,
1157
1156
"metadata" : {},
1158
- "outputs" : [],
1159
1157
"source" : [
1160
- " gene1 = 10*\" AGT\" "
1158
+ " ### How to read multiple values in a single line\n " ,
1159
+ " \n " ,
1160
+ " - use split() method of string class to split the input string into multiple values"
1161
1161
]
1162
1162
},
1163
1163
{
1166
1166
"metadata" : {},
1167
1167
"outputs" : [
1168
1168
{
1169
- "data" : {
1170
- "text/plain" : [
1171
- " 'AGTAGTAGTAGTAGTAGTAGTAGTAGTAGT'"
1172
- ]
1173
- },
1174
- "execution_count" : 2 ,
1175
- "metadata" : {},
1176
- "output_type" : " execute_result"
1169
+ "name" : " stdout" ,
1170
+ "output_type" : " stream" ,
1171
+ "text" : [
1172
+ " num1=10 and num2=20\n "
1173
+ ]
1177
1174
}
1178
1175
],
1179
1176
"source" : [
1180
- " gene1"
1177
+ " # Enter two numbers separated by space\n " ,
1178
+ " values = input()\n " ,
1179
+ " num1, num2 = values.split()\n " ,
1180
+ " num1 = int(num1)\n " ,
1181
+ " num2 = int(num2)\n " ,
1182
+ " print(f'{num1=} and {num2=}')"
1181
1183
]
1182
1184
},
1183
1185
{
You can’t perform that action at this time.
0 commit comments