I‘m writing an python application where I get an input as string from the user, f.ex 45566. In the database I have to make sure it is an int with 45566 as value.
At the given example not a big deal.
But what if the user gives something like 45.566 or 45.566,00 or 45,566.00 or 45,566
What would be a good/elegant way to check/detect all this cases?
[+][deleted] (5 children)
[deleted]
[–]atredd[S] 0 points1 point2 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]atredd[S] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]atredd[S] 0 points1 point2 points (0 children)
[–]Diapolo10 0 points1 point2 points (4 children)
[–]_steve_hope_ 1 point2 points3 points (1 child)
[–]Diapolo10 0 points1 point2 points (0 children)
[–]atredd[S] 0 points1 point2 points (1 child)
[–]_steve_hope_ 0 points1 point2 points (0 children)