Getting absolute value of a number in Python

Question:
How do you get the absolute value of a number in Python?

  1. |-3.14|
  2. abs(-3.14)
Answer:
B - is the correct answer