Update python.md

main
Matt Huntington 5 years ago committed by GitHub
parent e734f43788
commit f3be90e7b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -120,6 +120,19 @@ print(a[1]) #5
print(a[4]) #5.6
```
## Store an object as a "dictionary"
JS objects are called dictionaries in Python and use array access syntax:
```python
my_car = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
print(my_car["brand"])
```
## Perform a set of commands depending on a situation
```python

Loading…
Cancel
Save