SyntaxFix
Write A Post
Hire A Developer
Questions
If the format is that simple (a space separates the number from the rest) then
int(str1.split()[0])
would do it