DEV Community

Vicki Langer
Vicki Langer

Posted on • Updated on

Charming the Python: Builtins and Variables

If coding tutorials with math examples are the bane of your existence, keep reading. This series uses relatable examples like dogs and cats.


Builtin Functions

print("words")
>>> words
Enter fullscreen mode Exit fullscreen mode
min(10, 20, 30, 40)
>>> 10
Enter fullscreen mode Exit fullscreen mode
max(10, 20, 30, 40)
>>> 40
Enter fullscreen mode Exit fullscreen mode
sum([10, 20, 30, 40])
>>> 100
Enter fullscreen mode Exit fullscreen mode

Variables

  • must start with a letter or underscore
  • cannot start with a number
  • only contain letters, numbers, and underscores
  • case-sensitive

Series based on

Top comments (0)