I have this code:
st = '55000.0'
st = st.strip('.0')
print st
I expected it to print 55000
, but instead it prints 55
.
I thought perhaps the .
in the argument might need to be escaped (like in a regular expression); so I also tried st = st.strip('\.0')
, but the result is the same.
Why are all the zeros removed from the input? Why doesn't it stop after removing the .0
?