-
-
Save Mohamed2del/66f0b9a733e021f7537787be40febe43 to your computer and use it in GitHub Desktop.
text = "X-DSPAM-Confidence: 0.8475"; | |
startPos = text.find(':') | |
piece = text[startPos+1:] | |
end = float(piece) | |
print(end) |
text = "X-DSPAM-Confidence: 0.8475";
found = text.find('0')
sliced = text[found:found+7]
print(float(sliced))
check this one easy and simple
text = "X-DSPAM-Confidence: 0.8475";
t = text.find('0.8475')
number = text[t:]
print(float(number))
text = "X-DSPAM-Confidence: 0.8475";
we need to assign a variable to the word we want to find
stvalue = text.find('0.8475')
so from that string value we cut out the value from text string
value = text[stvalue:]
#Then we print out our Answer
print(float(value))
text = "X-DSPAM-Confidence: 0.8475";
number= text.find('0')
ft=float(text[number:])
print(ft)
text = "X-DSPAM-Confidence: 0.8475"
x= text.find(":")
print(x)
y= text[x+1:]
print(y)
value=float(y)
print(value)
Hei.
Here is my suggestion which works. This is only for help. Try yourself before copy code.
text = "X-DSPAM-Confidence: 0.8475";
find = text.find ('0.8475')
a = float(find)
print(text[find:])
text = "X-DSPAM-Confidence: 0.8475";
print(float(text[text.find("0"):]))
#Example of a working code:
text = "X-DSPAM-Confidence: 0.8475";
f = text.find(' ')
n = text[f:]
print(float(n.lstrip()))
text = "X-DSPAM-Confidence: 0.8475";
a=text.find('0')
print(float(text[a:]))
text = "X-DSPAM-Confidence: 0.8475"
start=text.find("0")
number= text[start:]
final=float(number)
print(final)
text = "X-DSPAM-Confidence: 0.8475"
f = text.find("0")
x = text[f:]
value = float(x)
print(value)
text = "X-DSPAM-Confidence: 0.8475"
print(float(text[text.find(':')+1:]))
text = ("X-DSPAM-Confidence : 0.8475")
atpos = text.find (" : ")
startpos = text.find (" 5 ",atpos)
host = text[atpos-4 :]
value = float(host)
print (value)
text = "X-DSPAM-Confidence: 0.8475"
finding = text.find("0")
#print(finding) - you will see what is the ordinal number of the number zero
number = text [23:]
print(float(number))
text = "X-DSPAM-Confidence: 0.8475"
space = text.find(':')
piece = text[space+1:]
print(float(piece))
this works
text = "X-DSPAM-Confidence: 0.8475"
pos=text.find('0.8475')
new=text[pos:]
j=float(new)
print(j)
text = "X-DSPAM-Confidence: 0.8475"
hewi = text.find(':')
hewi1 = text[hewi+1:]
hewi2 = float(hewi1)
print(hewi2)
3 lines:
text = "X-DSPAM-Confidence: 0.8475"
textNum=text.find('0')
print(float(text[textNum:len(text)]))
2 Lines: Better :)
text = "X-DSPAM-Confidence: 0.8475";
print(float(text[text.find(':')+1:]))
1 Line
print(float("X-DSPAM-Confidence: 0.8475"["X-DSPAM-Confidence: 0.8475".find(':')+1:]))
Smaller by 2 chars.
print(float("X-DSPAM-Confidence: 0.8475"["X-DSPAM-Confidence: 0.8475".find('0'):]))
text = "X-DSPAM-Confidence: 0.8475"
x= text.find(' ')
z= text[x+1:]
z= float (z)
print (z)
text = "X-DSPAM-Confidence: 0.8475"
a=text.find(":")
b=float(text[a+1:].lstrip())
print(b)
text = "X-DSPAM-Confidence: 0.8475"
text = float(text[text.find(':')+1:].lstrip())
print(text)
text = "X-DSPAM-Confidence: 0.8475"
x = text.find("0")
z = text.find("5")
print(float(text[x:z + 1]))
text = "X-DSPAM-Confidence: 0.8475"
start= text.find(':')
end=start[start+1:]
string=float(end)
print(string)
Text = “X-DSPAM-Confidence: 0.8475”
Pos = Text.find(‘:’)
Piece = text {Pos+2:}
end= float(piece)
Print(end)
text = "X-DSPAM-Confidence: 0.8475"
a = text.find(':')
f = float(text[a+1:])
print(f)
text = "X-DSPAM-Confidence: 0.8475"
a = text.find('0')
f = float(text[a:])
print(f)
text = "X-DSPAM-Confidence: 0.8475";
x = text.find('0')
y = text.find('7')
z = text[x:]
z = float(z)
print (z)