Python variable types post defines the different type’s variable in python. In this post, I will be covering the basis stuff which is used to convert a string into an integer and use it for further validation. The main intent of this article is to write few lines of code which can ask user to input the “IP Address Field” and split the string into different octets by using split function. Once this is done, after that convert the string to integer type so that we can check whether the given input has length of 4 or not (In case of IP Address we have a.b.c.d).
The same lines of codes can become more meaningful and useful when it is applied with if-else or with any kind of loop statements.
The given code is plain code which is used for basic understanding.