Archive:Python/Operators: Difference between revisions
wikademia>ArrowStomper |
wikademia>ArrowStomper |
||
| Line 71: | Line 71: | ||
That is how you do math with values from a dictionary. Don't forget to use quotations around the keys unless you use integers as the keys. Spend a couple of minutes messing around with this stuff, its fun and it'll help you remember it better. | That is how you do math with values from a dictionary. Don't forget to use quotations around the keys unless you use integers as the keys. Spend a couple of minutes messing around with this stuff, its fun and it'll help you remember it better. | ||
==Indexing== | ===Indexing=== | ||
You have already learned how to index in lesson 2. When you typed x[3] you where indexing. You may also index a string without first making a variable represent it. | You have already learned how to index in lesson 2. When you typed x[3] you where indexing. You may also index a string without first making a variable represent it. | ||