Determine if a string is numeric: Difference between revisions

Content added Content deleted
Line 1,851: Line 1,851:
<lang python>s = '123'
<lang python>s = '123'
if s.isdigit():
if s.isdigit():
# numeric</lang>
print int(s)</lang>


===Python: Most numeric literals===
===Python: Most numeric literals===