Course
What is Python?Aliasesand operatorArraysBooleansClassesCode blocksCommentsConditional statementsConsoleData structuresdatetime moduleDecoratorDictionariesDocstringsenumenumerate() functionEquality operatorException handlingFalseFile handlingFilter()FloatsFor loopsFormatted stringsFunctionsGeneratorGlobals()Greater than operatorGreater than or equal to operatorIf statementin operatorIndicesInequality operatorIntegersIteratorLambda functionLess than operatorLess than or equal to operatorList append() methodList comprehensionList count()List insert() methodList pop() methodList sort() methodListsLoggingmap() functionMatch statementMath moduleMerge sortMin()ModulesMultiprocessingMultithreadingNonenot operatorOOPor operatorParametersprint() functionProperty()Random modulerange() functionRecursionReduce()Regular expressionsrequests Libraryreturn statementround() functionSetsSQLiteString decode()String find()String join() methodString replace() methodString split() methodString strip()StringsTernary operatortime.sleep() functionTruetry...except statementTuplesVariablesWhile loopsZip function
Index in Python
Every element in a list has a numbered position called an index. Indices start at zero and increase with each further value. That means that the second element in temperatures
is at index [1]
.
python
temperatures = [17, 20, 26, 24]
print(temperatures[1])