Graphics Reference
In-Depth Information
Understand fundamental features of Python syntax. Python is a powerful programming language with a
varietyofdatatypes,controlstructureoptions,andusefulbuilt-infunctions.Itscharacteristicfeaturesinclude
its reliance on indentation to represent logical structure.
Master It Create a variable my_list and assign it the list [1,2,1,3,1,4] . Call the dir() func-
tion with this list as an argument. Which of the methods returned by dir() do you think would be the
correct method for removing one of the elements from the list? Experiment with the methods you think
wouldwork,andtrytogetridofthenumber 2 fromthelist,sothelistbecomes [1,1,3,1,4] .Which
methoddoyouthinkwillreturnthenumberoftimesthenumber 1 appearsinthelist?Additionally,how
can you use .__doc__ strings to inquire about what you think the right answer is?
Search WWH ::




Custom Search