Typescript Check Type Of String In Python