Versatile Python 3.x
Versatile Python 3.x
TryPython

Python 3.8.0 (default, Nov 14 2019, 22:29:45)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> help
help> help
Welcome to Python 3.8's help utility!
If this is your first time using Python, you should definitely check out
the tutorial on the Internet at https://docs.python.org/3.8/tutorial/.
Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".
To get a list of available modules, keywords, symbols, or topics, type
"modules", "keywords", "symbols", or "topics".  Each module also comes
with a one-line summary of what it does; to list the modules whose name
or summary contain a given string such as "spam", type "modules spam".
help>

➜  ~ python3
Python 3.7.3 (default, Apr 24 2020, 18:51:23)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello, Python ")
Hello, Python
>>> print("Hello, Python ");
Hello, Python
>>> 
control flow
https://docs.python.org/3/tutorial/controlflow.html
# For loop on a list
>>> numbers = [2, 4, 6, 8]
>>> product = 1
>>> for number in numbers:
...    product = product * number
...
>>> print('The product is:', product)
The product is: 384
Compound Data Types
https://docs.python.org/3/tutorial/introduction.html#lists
# Python 3: List comprehensions
>>> fruits = ['Banana', 'Apple', 'Lime']
>>> loud_fruits = [fruit.upper() for fruit in fruits]
>>> print(loud_fruits)
['BANANA', 'APPLE', 'LIME']
# List and the enumerate function
>>> list(enumerate(fruits))
[(0, 'Banana'), (1, 'Apple'), (2, 'Lime')]
Intuitive Interpretation
http://docs.python.org/3/tutorial/introduction.html#using-python-as-a-calculator
# Python 3: Simple arithmetic
>>> 1 / 2
0.5
>>> 2 ** 3
8
>>> 17 / 3  # classic division returns a float
5.666666666666667
>>> 17 // 3  # floor division
5
Quick & Easy to Learn
https://docs.python.org/3/tutorial/
# Python 3: Simple output (with Unicode)
>>> print("Hello, I'm Python!")
Hello, I'm Python!
# Input, assignment
>>> name = input('What is your name?\n')
>>> print('Hi, %s.' % name)
What is your name?
Python
Hi, Python.
Functions Defined
https://docs.python.org/3/tutorial/controlflow.html#defining-functions
# Python 3: Fibonacci series up to n
>>> def fib(n):
>>>     a, b = 0, 1
>>>     while a < n:
>>>         print(a, end=' ')
>>>         a, b = b, a+b
>>>     print()
>>> fib(1000)
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
Python REPL
online console
https://www.pythonanywhere.com/
refs
Python 3.8
https://docs.python.org/3.8/tutorial
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
Versatile Python 3.x的更多相关文章
- Awesome TensorFlow
		Awesome TensorFlow A curated list of awesome TensorFlow experiments, libraries, and projects. Inspi ... 
- tornado 学习笔记2 Python web主流框架
		2.1 Django 官方网址:https://www.djangoproject.com/ 简介:Django is a high-level Python Web framework that e ... 
- Python框架、库以及软件资源汇总
		转自:http://developer.51cto.com/art/201507/483510.htm 很多来自世界各地的程序员不求回报的写代码为别人造轮子.贡献代码.开发框架.开放源代码使得分散在世 ... 
- Think Python - Chapter 17 - Classes and methods
		17.1 Object-oriented featuresPython is an object-oriented programming language, which means that it ... 
- A Complete Tutorial on Tree Based Modeling from Scratch (in R & Python)
		A Complete Tutorial on Tree Based Modeling from Scratch (in R & Python) MACHINE LEARNING PYTHON ... 
- Awesome Python
		Awesome Python A curated list of awesome Python frameworks, libraries, software and resources. Insp ... 
- Machine and Deep Learning with Python
		Machine and Deep Learning with Python Education Tutorials and courses Supervised learning superstiti ... 
- Python中的内置函数
		2.1 Built-in Functions The Python interpreter has a number of functions built into it that are alway ... 
- Python Tutorial学习(十一)-- Brief Tour of the Standard Library – Part II
		11.1. Output Formatting 格式化输出 The repr module provides a version of repr() customized for abbreviate ... 
随机推荐
- (Oracle)已有数据表建立表分区—在线重定义
			今天在做数据抽取的时候,发现有一张业务表数据量达到了5000W,所以就想将此表改为分区表.分区表的有点如下: 1.改善查询性能:对分区对象的查询可以仅搜索自己关心的分区,提高检索速度.2.增强可用性: ... 
- 动态库与静态库的学习  博主写的很好   静态库 编译的时候 需要加上 static   动态库编译ok运行不成功就按照文章中的方法修改
			来源连接 http://www.cnblogs.com/skynet/p/3372855.html C++静态库与动态库 这次分享的宗旨是--让大家学会创建与使用静态库.动态库,知道静态库与动态库 ... 
- docker通过dockerfile构建JDK最小镜像,Docker导出导入镜像
			docker通过dockerfile构建JDK最小镜像,Docker导出导入镜像 一.docker通过dockerfile构建JDK最小镜像 1.1 下载JRE 1.2 解压JRE,删除相关不需要文件 ... 
- owncloud搭建
			使用OwnCloud建立属于自己私有的云存储网盘 OwnCloud概述: OwnCloud 一款文件主机服务软件,就是我们平时使用的云存储,不过这是在自己主机的服务器上建立属于自己的私有云,OwnCl ... 
- java-poi创建模板
			package com.jy.demo.web; import java.io.FileOutputStream; import org.apache.poi.ss.usermodel.Cell; i ... 
- H3C交换机DHCP配置
			1.dhcp配置 dhcp enable:开启dhcp功能 dhcp server forbidden-ip 10.1.130.2 10.1.130.10----排除dhcp的一些地址 dhcp se ... 
- 3. Linux常用系统状态检测命令
			1.ifconfig :于获取网卡配置与网络状态等信息,如网卡名称.IP.MAC等 2.uname -a :完整地查看当前系统的内核名称.主机名.内核发行版本.节点名.系统时间.硬件名称.硬件平台.处 ... 
- MySQL常用SQL语句1
			-- 创建表 CREATE TABLE USER ( -- id默认每个表都该拥有(非空 不重复) -- (id是每一行的唯一标识) -- 其他字段可能会重复,我们无法依赖其他的字段去确定某一行记录 ... 
- Broken robot CodeForces - 24D (三对角矩阵简化高斯消元+概率dp)
			题意: 有一个N行M列的矩阵,机器人最初位于第i行和第j列.然后,机器人可以在每一步都转到另一个单元.目的是转到最底部(第N个)行.机器人可以停留在当前单元格处,向左移动,向右移动或移动到当前位置下方 ... 
- 主席树  【权值线段树】 && 例题K-th Number POJ - 2104
			一.主席树与权值线段树区别 主席树是由许多权值线段树构成,单独的权值线段树只能解决寻找整个区间第k大/小值问题(什么叫整个区间,比如你对区间[1,8]建立一颗对应权值线段树,那么你不能询问区间[2,5 ... 
