integer_var = 1000#integer float_var = 12.01#float string_var = "string"#string list_var = [ "string", 1000, 2.23 ]#mutable, elements and size can be changed, can add elements tupe_var = ("string", 1000, 2.23)#immutable, read-only, can add elements dict = {}#Dictionary dict["float"] = 10.2#Dictionary dict[10] = "integer"#Dictionary tinydict = {'float': 10.2, 10 : "integer"}#Dictionary
留言
張貼留言