I have a string which looks like this :
'< 5s' or '< 0.5s'
And i'm trying to extract the 'duration' from the string. I already have this :
a = '< 5s'
b = int(list(filter(str.isdigit, a))[0])
print(b)
but if i use '< 0.5s' it returns me 0. How can i include the , with the number ?