Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 2

96 bytes added, 18:54, 25 May 2017
PART 2 - Arguments
:#To inspect this library, and look at all that it contains, we can use the '''dir()''' function. This can be used to inspect any library (in fact, inspect other items other than libraries) in order to refer to functions and values that are available. Issue the following function:<source>
dir(sys)
</source>:#Now don't You may feel overwhelmed, with all of this will provide a lot of information, but we can also get some hints at not to worry, there are additional tools and tips on how to obtain information regarding these functions contain in the different information this library provides. <br><br>:#Issue the following functions and note what they do:<source>
print(sys.version) # tells us our python version
print(sys.platform) # tells us our operating system platform
13,420
edits