Checking and Casting Data Types
Explore how to check data types in Python and PowerShell using their built-in methods. Understand type casting and conversion between common data types, and compare how each language handles these operations effectively.
We'll cover the following...
We'll cover the following...
Checking the Data Type
Every Powershell object automatically has an in-built method, GetType(), which can be accessed using the (.) dot operator, as demonstrated in the following example to check data types.
Similarly, in Python, we can use the type() inbuilt method to test/check the data type.