0

text = "X-Dspam-Confidence: 0.8475" ;

Write code using find() and string slicing to extract the number at the end of the line below.Convert the extracted value to a floating point number and print it out

28th Jun 2020, 8:38 AM
Aditya Deepak Lohar
Aditya Deepak Lohar - avatar
3 odpowiedzi
+ 5
We can't so your homework here. Pls show your attempt
28th Jun 2020, 8:40 AM
Nilesh
Nilesh - avatar
0
str = "X-Dspam-Confidence:0.8475" ipos = str find('0.8475') piece = str (ipos + 2:) value = float (piece) print (value)
28th Jun 2020, 8:45 AM
Aditya Deepak Lohar
Aditya Deepak Lohar - avatar