Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 4

130 bytes added, 16:18, 14 June 2017
PART 2 - Sets
:#First, access a set through the index.<source>
s1[0]
</source>:#This should have created an error, this is not how to access data inside a set because they are unordered'''un-ordered'''. Instead , you should use the method (used in the previous section) to check to see if a value is insidecontained within the set.<br><br>:#To demonstrate, issue the following:<source>
'Ix' in s1
'Geidi' in s1
13,420
edits