Python3 Data types and variables
2020-02-02 18:21
411 查看
## Integer:such as the following >>> 50 50 >>> 000 0 >>> -8080 -8080 Floating point number:such as the following >>> 1.23 1.23 >>> -2.32 -2.32 Character string:such as the following >>> 'I am \"valecalida\"!' 'I am "valecalida"!' >>> print("I am 'valecalida'") I am 'valecalida' >>> print('I am "valecalida"') I am "valecalida" >>> "I am 'valecalida'!" "I am 'valecalida'!" ##Note single and double quotation marks >>> print('''I am 'valecalida111'! ... I am 'valecalida222'! ... I am 'valecalida333'!''') I am 'valecalida111'! I am 'valecalida222'! I am 'valecalida333'! ##Multi line content Boolean value:such as the following >>> True True >>> False False >>> 3>2 True >>> 3<2 False >>> True and True True >>> True and False False >>> True or True True >>> True or False True >>> False or False False >>> False or True True >>> 3>2 and 2>1 True >>> 3>2 and 2>4 False >>> not True False >>> not 2>3 True variable:such as the following >>> a = 1 >>> a 1 >>> strint = 'I am valecalida' >>> strint 'I am valecalida' >>> Answer = True >>> Answer True
转载于:https://my.oschina.net/u/3875850/blog/3021823
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- 1.2 C++变量和数据类型 (Variables and Data types )
- php tutorial Constant,Variables and data types
- More on Variables and Data Types(Chapter 10 of Programming in Objective-C 2.0)
- Data: Values, types and expressions and Variables
- 6.087 Practical Programming in C, lec2: Variables and datatypes, operators.
- More on Variables and Data Types(Chapter 10 of Programming in Objective-C 2.0)
- Learn Python the Hard Way 7: Ex05 More Variables and Printing
- An introduction to Redis data types and abstractions
- Pythonic Data Structures and Algorithms(Array 3)
- c++教程(三:Variables and types)
- SAP DEMO-Basic Statements-Data Types and Data Objects
- 2 Datatype and variables in VBScript
- JanusGraph->Index Backends -> Search Predicates and Data Types
- (转)Determining equivalent SQL and COBOL data types
- Data Structures and Algorithms in Python:Python中的数据结构和算法
- [Python for Data Anlysis]CH04 Numpy Basics -- Arrays and Vectorized Computation
- Data Types and Data Structures (数据类型和数据结构)
- Python_File and data formatting_practice190614
- Hands-On Data Science and Python Machine Learning 免积分下载
- A Python snippet almanac for scientific computing and data visualization.