0
How to convert string into slice strings then convert it to integer in python?
If input = 1 0 1 I need to assign such that a=1 ,b=0,c=1
8 Respuestas
+ 3
Try split() method
+ 1
To convert string to integer use int() function.
0
The user who assign ,am not ,
Example
I prepare the program that
St=input()
And I need from user to assign number such as 1 0 1
In c++ if user assign 1 0 1
I deal with this by cin>>a>>b>>c;
I don't know like it in python
0
https://code.sololearn.com/c2QNJXXug4UJ/?ref=app
Sorry am new person joined to community,and am not good deal with tools in program
0
you can sum up strings. Convert them first
0
Yeah ,how