Please enable JavaScript.
Coggle requires JavaScript to display documents.
Python (Basic (Simple Operations (+, - , *, /, ** exponential
//…
Python
Basic
Simple Operations
-
- ** exponential
- // quotie of a division
- % module returns what ramains of a division
-
-
-
-
Control Structure
-
-
-
List
variable = ["Hello", "world", "!"]
print(words[0])
print(words[1])
print(words[2])
A list will contain items of a single item type, but it is also possible to include several different types.
Lists of lists are often used to represent 2D grids, as Python lacks the multidimensional arrays that would be used for this in other languages.
things = ["string", 0, [1, 2, number], 4.56]
strings, can be indexed like lists
-
List reassigned
nums = [7, 7, 7, 7, 7]
nums[2] = 5
print(nums)
-
-
List Function
-
-
-
-
max(list): Returns the list item with the maximum value
min(list): Returns the list item with minimum value
list.count(obj): Returns a count of how many times an item occurs in a list
list.remove(obj): Removes an object from a list
list.reverse(): Reverses objects in a list
List(range(num)
List(range(begin,End)
List(range(begin,end,equence)
range: Create a lis os integer acordinho to param adding to a variable
-
-
-