Python Tutorial – Data Structure Type Conversion
We can convert a type of data structure to another type. Learn to convert the type of a data structure to another type.
range() function is introduced in Python3, in Python2 it is xrange(). Range can be used to generate a sequence of numbers. Range will not return direct sequence. It will return a range object of immutable numbers. Later we need to…
Loops are block of statements that will be repeatedly executed until the condition is true. Python has 2 types of loops: Type #1: While Loop: execute until given condition is true Output: 5 4 3 2 1 Type #2: For…