Hello, I am still a newbie in python. I am trying to slice a string, but I don't know how.
def start():
exp = "1+2";
string1 = exp.split("+");
print exp;
print "Operator 1 is : " , op1;
print "Operator 2 is : " , op2;
I want to output:
1+2
Operator 1 is : 1;
Operator 2 is : 2;
but the problem is I dont know how. will someone help me?.Thanks a lot in advance.