>>> list = ['satu', 'dua', 333, 456546, 'infinite']
>>> print list[1]
dua
>>> list
['satu', 'dua', 333, 456546, 'infinite']
ref >> http://www.tutorialspoint.com/python/python_lists.htm
>>> my_tuples = 'satu', 'dua', 333, 'infinite'
>>> my_tuples[1]
dua
>>> my_tuples
('satu', 'dua', 333, 'infinite')
ref >>> http://www.tutorialspoint.com/python/python_tuples.htm
>>> dict = {'Alice': '2341', 'Beth': '9102', 'Cecil': '3258'}
>>> dict['Beth']
9102
>>> dict
{'Alice': '2341', 'Beth': '9102', 'Cecil': '3258'}
ref >>> http://www.tutorialspoint.com/python/python_dictionary.htm
No comments:
Post a Comment
Terima kasih