How can I use isdecimal() on a string returned by PropertyListBox. I can’t get this code to work for some reason.
if results: for number in results: number = unicode(number, "utf-8") if not number.isdecimal(): print 'Enter numbers only!' return(None) results = map(float, results)
Edited because the conversion from string to float didn’t work. The above code works on whole numbers but fails on decimal numbers.