jupyter notebook for python (三)

(一)内置函数的简单使用

Using the Python type() function

type() returns the data type of python objects

strintfloat

What does using type() reveal?

  • str: when type() returns str that means it has evaluated a string characters (numbers, letters, punctuation...) in quotes
  • int: when type() returns int that means it has evaluated an Integer (+/- whole numbers)
  • float: when type() returns float that means it has evaluated decimal numbers (e.g. 3.33, 0.01, 9.9999 and 3.0), ...more later in the course

示例图:

(a)

jupyter notebook for python (三)

(b)

jupyter notebook for python (三)

(c)

jupyter notebook for python (三)

翻译: display:显示