A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/331892.html below:

complex data types?

complex data types? complex data types?richard richard at fake.com
Sat Sep 17 21:49:32 EDT 2005
I'd like to have an array in which the elements are various data types. 
How do I do this in Python?  

For example:

array[0].artist = 'genesis'
array[0].album = 'foxtrot'
array[0].songs = ['watcher', 'time table', 'friday']
array[1].artist = 'beatles'
array[1].album = 'abbey road'
array[1].songs = ['come', 'something', 'maxwell']
    	
Everything I try generates errors or results in array[0].songs equaling 
array[1].songs. I feel I'm missing something obvious.

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4