Symbols, plain meanings, and fun ways to remember them.
( )
— parenthesesMeaning: Hold things for a function, like hands. Remember: “Hands that hold.”
[ ]
— square bracketsMeaning: A list’s treasure chest. Remember: “Open the chest to pick a gem.”
{ }
— curly bracesMeaning: A dictionary’s map of labels to things. Remember: “Curly map of pairs.”
=
— equalsMeaning: Put a value in a name box. Remember: “Slide into the box.”
+
-
*
/
Meaning: Math add, minus, times, divide. Remember: “Math tools.”
print(...)
Meaning: Show text on screen. Remember: “Say it out loud.”
def name(...):
Meaning: Start a function (named trick). Remember: “Name a trick and do it.”
return
Meaning: Hand the answer back. Remember: “Give it back.”
#
— commentMeaning: A note to people; the computer skips it. Remember: “Whisper to humans.”