basicdatatype.rst
author Nishanth <nishanth@fossee.in>
Wed, 22 Sep 2010 22:53:37 +0530
changeset 186 488f05b1fbcc
parent 176 c1242f073db3
child 201 6b1efb74d914
permissions -rw-r--r--
reviewed basic_data_types_
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
     1
Hello friends and welcome to the tutorial on Basic Data types and
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
     2
operators in Python.  
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
     3
{{{ Show the slide containing title }}}
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
     4
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
     5
{{{ Show the slide containing the outline slide }}}
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
     6
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
     7
In this tutorial, we shall look at::
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
     8
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
     9
 * Various Datatypes in Python
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    10
 * Operators with a little hands-on on how they can be applied to 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    11
   the different data types.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    12
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    13
Since this a hands on session, you will require python installed in your 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    14
computer. 
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    15
.. #[Nishanth]: this line is not required
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    16
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    17
First we will explore python data structures in the domain of numbers.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    18
There are three built-in data structures in python to represent numbers.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    19
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    20
.. #[Nishanth]: Did you mean data types when you said data structures??
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    21
                Data structures is used for lists and others.
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    22
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    23
{{{ A slide to make a memory note of this }}}
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    24
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    25
These are:
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    26
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    27
  * Integers 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    28
  * Complex and 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    29
  * Boolean 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    30
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    31
Lets first talk about integers. ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    32
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    33
   a = 13
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    34
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    35
.. #[Nishanth]: give a space before and after the = sign
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    36
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    37
Thats it, there we have our first integer variable a.
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    38
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    39
.. #[Nishanth]: Show the value of a
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    40
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    41
If we now see ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    42
     
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    43
   type(a)
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    44
   <type 'int'>
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    45
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    46
This means that a is a type of int. Being an int data structure 
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    47
in python means that there are various functions that this variable
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    48
has to manipulate it different ways. You can explore these by doing,
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    49
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    50
  a.<Tab>
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    51
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    52
.. #[Nishanth]: a.<Tab> is not a good idea for int or float
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    53
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    54
Lets see the limits of this int.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    55
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    56
  b = 99999999999999999999
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    57
  b
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    58
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    59
As you can see even when we put a value of 9 repeated 20 times 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    60
python did not complain. However when you asked python to print
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    61
the number again it put a capital L at the end. Now if you check
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    62
the type of this variable b, ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    63
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    64
  type(b)
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    65
  <type 'long'>
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    66
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    67
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    68
The reason for this is that python recognizes large integer numbers
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    69
by the data type long. However long type and integer type share there 
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    70
functions and properties.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    71
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    72
Lets now try out the second type in list called float.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    73
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    74
Decimal numbers in python are recognized by the term float ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    75
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    76
  p = 3.141592
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    77
  p
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    78
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    79
If you notice the value of output of p isn't exactly equal to p. This
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    80
is because computer saves floating point values in a specific
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    81
format. There is always an aproximationation. This is why we should
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    82
never rely on equality of floating point numbers in a program.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    83
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    84
The last data structure in the list is complex number ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    85
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    86
  c = 3.2+4.6j
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    87
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    88
as simple as that so essentialy its just a combination of two floats the 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    89
imaginary part being define by j notation usually used in electrical 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    90
engineering. Complex numbers have a lot of functions specific to them.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    91
Lets check these ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    92
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    93
  c.<Tab>
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    94
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    95
.. #[Nishanth]: rephrase the "j used in electrical engineering"
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    96
                Its ok if you skip it also. Just say that here
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
    97
                j is used and not i
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    98
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
    99
Lets try some of them ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   100
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   101
  c.real
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   102
  c.imag
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   103
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   104
c.real gives the real part of the number and c.imag the imaginary.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   105
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   106
We can get the absolute value using the function ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   107
 
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   108
  abs(c)
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   109
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   110
Python also has Boolean as a built-in type.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   111
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   112
Try it out just type ::  
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   113
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   114
  t = True
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   115
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   116
note that T in true is capitalized.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   117
  
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   118
You can apply different Boolean operations on t now for example ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   119
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   120
  f = not t 
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   121
  In[]: f
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   122
  In[]: f or t
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   123
  In[]: f and t 
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   124
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   125
.. #[Nishanth]: remove In[]: and include spaces before and after = symbol
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   126
                I don't want to edit it everywhere in the script
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   127
  
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   128
The results explanotary in themselves.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   129
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   130
The usage of boolean brings us to an interesting question of precendence.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   131
What if you want to apply one operator before another. 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   132
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   133
Well you can use parenthesis for precedence.
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   134
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   135
Lets write some piece of code to check this out.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   136
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   137
  In[]: a=False 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   138
  In[]: b=True 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   139
  In[]: c=True
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   140
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   141
To check how precedence changes with parenthesis. We will try two
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   142
expressions and their evaluation.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   143
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   144
one ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   145
 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   146
  In[]: (a and b) or c
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   147
 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   148
This expression gives the value True
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   149
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   150
where as the expression :: 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   151
  
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   152
  In[]: a and (b or c) 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   153
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   154
gives the value False.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   155
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   156
Lets now discuss sequence data structures in python. Sequence 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   157
datatypes are those in which elements are kept in a sequential 
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   158
order. All the elements accessed using index. 
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   159
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   160
{{{ slide to for memory aid }}}
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   161
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   162
The sequence datatypes in python are ::
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   163
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   164
 * list
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   165
 * string
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   166
 * tuple
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   167
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   168
The list type is a container that holds a number of other 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   169
objects, in the given order.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   170
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   171
We create our first list by typing :: 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   172
  
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   173
  In[]: num = [1, 2, 3, 4]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   174
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   175
.. #[Nishanth]: Show the value of the variable 
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   176
Items enclosed in square brackets separated by comma 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   177
constitutes a list.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   178
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   179
Lists can store data of any type in them. 
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   180
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   181
We can have a list something like ::
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   182
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   183
 In[]: var = [1, 1.2, [1,2]]	
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   184
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   185
.. #[Nishanth]: Show the value of the variable 
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   186
print var
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   187
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   188
Now we will have a look at strings 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   189
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   190
type :: 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   191
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   192
 In[]: w="hello"
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   193
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   194
.. #[Nishanth]: Show the value of the variable 
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   195
w is now a string variable with the value "hello"
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   196
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   197
{{{ Memory Aid Slide }}}
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   198
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   199
Python strings can actually be defined in three different ways ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   200
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   201
  In[]: k='Single quote'
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   202
  In[]: l="Double quote contain's single quote"
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   203
  In[]: m='''"Contain's both"'''
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   204
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   205
Thus, single quotes are used as delimiters usually.
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   206
When a string contains a single quote, double quotes are used as delimiters.
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   207
When a string quote contains both single and double quotes, triple quotes are
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   208
used as delimiters.
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   209
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   210
The last in the list of sequence data types is tuple.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   211
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   212
To create a tuple  we use normal brackets '('
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   213
unlike '[' for lists.::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   214
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   215
  In[]: t = (1, 2, 3, 4, 5, 6, 7, 8)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   216
  
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   217
Because of their sequential property there are certain functions and 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   218
operations we can apply to all of them. 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   219
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   220
{{{ Slide for memory aid }}}
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   221
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   222
The first one is accessing.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   223
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   224
They can be accessed using index numbers ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   225
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   226
  In[]: num[2]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   227
  In[]: num[-1]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   228
  In[]: w[1]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   229
  In[]: w[3]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   230
  In[]: w[-2]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   231
  In[]: t[2]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   232
  In[]: t[-3]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   233
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   234
Negative indices can be used to access in reverse
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   235
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   236
.. #[Nishanth]: Elaborate on indexing.
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   237
                Indexing starts from 0 when moving from left to right
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   238
                Indexing starts from -1 when moving from right to left
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   239
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   240
Addition gives a new sequence containing both sequences ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   241
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   242
     In[]: num+var
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   243
     In[]: p="another string"
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   244
     In[]: w+p
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   245
     In[]: t2=(3,4,6,7)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   246
     In[]: t+t2
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   247
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   248
len function gives the length  ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   249
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   250
  In[]: len(num)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   251
  In[]: len(w)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   252
  In[]: len(t)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   253
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   254
Prints the length the variable.
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   255
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   256
We can check the containership of an element using the 'in' keyword ::
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   257
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   258
  In[]: 3 in num
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   259
  In[]: 'H' in w
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   260
  In[]: 2 in t
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   261
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   262
We see that it gives True and False accordingly.
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   263
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   264
Find maximum using max function and minimum using min:: 
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   265
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   266
  In[]: max(t)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   267
  In[]: min(w)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   268
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   269
Get a sorted list and reversed list using sorted and reversed function ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   270
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   271
  In[]: sorted(num)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   272
  In[]: reversed(w)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   273
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   274
As a consequence of the order one we access a group of elements together.
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   275
This is called slicing and striding.
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   276
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   277
First Slicing 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   278
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   279
Given a list ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   280
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   281
  In[]:j=[1,2,3,4,5,6]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   282
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   283
Lets say we want elements starting from 2 and ending in 5.
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   284
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   285
For this we can do ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   286
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   287
  In[]: j[1:4]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   288
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   289
The syntax for slicing is sequence variable name square bracket
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   290
first element index, colon, second element index.::
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   291
.. #[nishanth]: specify that the last element is not included
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   292
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   293
  In[]: j[:4]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   294
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   295
If first element is left blank default is from beginning and if last
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   296
element is left blank it means till the end.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   297
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   298
 In[]: j[1:]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   299
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   300
 In[]: j[:]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   301
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   302
This effectively is the whole list.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   303
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   304
Striding is similar to slicing except that the step size here is not one.
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   305
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   306
Lets see by example ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   307
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   308
  In[]: z=[1,2,3,4,5,6,7,8,9,10]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   309
  In[]: z[1:8:2]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   310
  Out[]:[2, 4, 6, 8]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   311
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   312
The colon two added in the end signifies all the alternate elements. This is why we call this concept
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   313
striding because we move through the list with a particular stride or step. The step in this example
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   314
being 2. 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   315
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   316
We have talked about many similar features of lists, strings and tuples. But there are many important
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   317
features in lists that differ from strings and tuples. Lets see this by example.::
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   318
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   319
  In[]: z[1]=9
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   320
  In[]: w[1]='k'
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   321
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   322
{{{ slide to show the error }}}
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   323
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   324
.. #[Nishanth]: Use sensible variable names. At this point no one will remember
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   325
                that z is a list and w is tuple.
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   326
                for example you can use names like some_list, a_tuple etc.
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   327
                or you can also use l for list, t for tuple and s for string
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   328
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   329
As you can see while the first command executes with out a problem there is an error on the second one.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   330
  
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   331
Now lets try ::
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   332
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   333
  In[]: t[1]=5
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   334
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   335
Its the same error. This is because strings and tuples share the property of being immutable.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   336
We cannot change the value at a particular index just by assigning a new value at that position.
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   337
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   338
In case of strings we have special functions to appy relacement and other things while tuples cannot
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   339
be changed at all. 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   340
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   341
.. #[Nishanth]: Even in strings also the special functions do not modify the
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   342
                original string. A new string is created instead. These have 
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   343
                been provided for string manipulation.
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   344
                hence I don't think you have to mention this.
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   345
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   346
We have looked at different types but we need to convert one data type into another. Well lets one
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   347
by one go through methods by which we can convert one data type to other:
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   348
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   349
We can convert all the number data types to one another ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   350
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   351
  In[]: i=34
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   352
  In[]: d=float(i)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   353
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   354
Python has built in functions int, float and complex to convert one number type
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   355
data structure to another.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   356
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   357
  In[]: dec=2.34
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   358
  In[]: dec_con=int(dec)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   359
  
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   360
.. #[Nishanth]: Show the value of the variables
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   361
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   362
As you can see the decimal part of the number is simply stripped to get the integer.::
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   363
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   364
  In[]: com=2.3+4.2j
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   365
  In[]: float(com)
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   366
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   367
In case of complex number to floating point only the real value of complex number is taken.
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   368
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   369
Similarly we can convert list to tuple and tuple to list ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   370
  
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   371
  In[]: lst=[3,4,5,6]
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   372
  In[]: tup=tuple(lst)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   373
  In[]: tupl=(3,23,4,56)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   374
  In[]: lst=list(tuple)
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   375
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   376
However string to list and list to string is an interesting problem.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   377
Lets say we have a string ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   378
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   379
  In: somestring="Is there a way to split on these spaces."
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   380
  In: somestring.split()
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   381
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   382
.. #[Nishanth]: Did you try list(somestring). What does it give??
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   383
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   384
This produces a list with the string split at whitespace.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   385
similarly we can split on some other character.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   386
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   387
  In: otherstring="Tim,Amy,Stewy,Boss"
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   388
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   389
How do we split on comma , simply pass it as argument ::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   390
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   391
  In: otherstring.split(',')
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   392
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   393
join function does the opposite. Joins a list to make a string.::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   394
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   395
  In[]:','.join['List','joined','on','commas']
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   396
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   397
Thus we get a list joined on commas. Similarly we can do spaces.::
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   398
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   399
  In[]:' '.join['Now','on','spaces']
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   400
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   401
Note that the list has to be a list of strings to apply join operation.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   402
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   403
.. #[Nishanth]: string to list is fine. But list to string can be left for
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   404
                string manipulations. Just say it requires some string 
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   405
                manipulations and leave it there.
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   406
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   407
.. #[Nishanth]: Where is the summary
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   408
                There are no exercises in the script
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   409
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   410
{{{ Show the "sponsored by FOSSEE" slide }}}
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   411
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   412
This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   413
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   414
Hope you have enjoyed and found it useful.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   415
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   416
Thank You.
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   417
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   418
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   419
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   420
Author              : Amit Sethi
186
488f05b1fbcc reviewed basic_data_types_
Nishanth <nishanth@fossee.in>
parents: 176
diff changeset
   421
Internal Reviewer 1 : Nishanth
176
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   422
Internal Reviewer 2 : 
c1242f073db3 Initial commit basic data types
amit
parents:
diff changeset
   423
External Reviewer