Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Python List

The list is a most versatile datatype available in Python which can be written as a list of comma-separated values (items) between square brackets. Good thing about a list is that items in a list need not all have the same type.

Creating a list is as simple as putting different comma-separated values between squere brackets. For example:

Python Array String

Arrays String

As we declare string, we can use it as Array of String.

string = 'GoHired'
print string[0]
>> G


Python String and numbers

When working with data, we need ways to store it in variables so we can manipulate it.

three of the most common data types used in programming: numbers, strings and booleans. We assigned those data types to variables one-by-one, like so:

With working code below find examples and learn Python easily..