📔
Hello-Python-Tutorial
CtrlK
  • Preface
  • Introduction
    • What is Python?
    • Language level
    • Python can do
    • Python can not do
    • Who using Python?
  • Python Basic
    • Install Python
    • Run Python on IDLE
    • Operator/Operand
    • Data Type
    • Assignment/Variable
    • Intellij IDEA
    • First App
  • Flow Control
    • Boolean/Logic Operator
    • Relational Operator
    • Code Block
    • If/Else
    • While
    • For loop
    • Import
    • Homework
  • Function
    • First Function
    • Return Statement
    • Function Scope
    • Try/Except/finally
    • Homework
  • List and Tuple
    • List
    • List Example
    • Method
    • List-like Type
    • Reference
    • Copy Module
    • Homework
  • Dictionary
    • Dictionary
    • Method
    • Dictionary Example
    • Homework
  • String Operation
    • Escape Character
    • Raw String
    • In/Not In
    • String Method1
    • String Method2
    • Homework
  • Advance
Powered by GitBook
On this page

Was this helpful?

  1. Python Basic

Data Type

型別

數字的型別有三種:int, float, complex

'This is python'則是字串型別(str)

試看看以下的程式碼,python shell會幫我們印出不同值的型別。

print(type(1))
print(type(1.0))
print(type(1j))
print(type('abc'))
PreviousOperator/OperandNextAssignment/Variable

Last updated 2 years ago

Was this helpful?