Monday, July 25, 2011

Python Data Types - පයිතන් දත්ත වර්ග

පහත සඳහන් පයිතන් දත්ත වර්ග සලකන්න
එම දත්ත අයත් වන පයිතන් දත්ත  අනුපිළිවෙළින්

'win', ['Nimal',55,'male'], ('abc',45,'xyz'), {2:'name','tel':'0721475454'}

1. string, float, double, array
2. string, tuple, dictionary, list
3. string, long, float, complex
4. string, array, integer, list
5. string, list, tuple, dictionary


Data type Description and examples Bits
integer signed integer, +/ - 2147483647 32
float double precision, like 1.23 or 7.8e-28 64
long integer large integer, trailing L, 234187626348292917L, 7L
octal integer base-8 integer, leading 0 as in 0177 32
hexadecimal integer base-16 integer, leading 0x as in 0x9FC 32
complex real and imaginary parts written as 3 + 4j or 1.23 - 0.0073j
string ordered collection of characters, enclosed by pairs of ', or " characters
list ordered collection of objects, like [1,22,[321,'cow'],'horse']
dictionary collection of associated key:data pairs {'first':'alpha','last':'omega'}
tuples  ('hen','duck',('rabbit','hare'),'dog','cat')
file file in disk

No comments:

Post a Comment