由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
_Python版 - The syntax of python is concise, I want to share a example.
相关主题
Another Easter egg :)))Has any of you tried SmartCode?
新人报道,请问各位大牛如何开始学习python?来几个C++测试题
python 问题 (转载)一道面试题看不懂
如何写适合于自动生成有规范格式文档的doc string问道FB的题
谁给介绍一下Ruby?c++/python 强化班 (转载)
tbl1.col1 = tbl2.col2 (+)latex example问题
Python里面为什么range(0,5)不用0:5来表示?急,定时运行程序的问题
如何用matlab构造如下矩阵[合集] quantlib 下面的example 怎么编译?
相关话题的讨论汇总
话题: example话题: string话题: python话题: concise话题: syntax
1 (共1页)
r*******n
发帖数: 3020
1
how to reverse a string.
For example:
string = 'I am a Chinese'
reverse_string = string[::-1]
To make this club active, anybody?
i*****f
发帖数: 578
2
Thanks for sharing, runPy! Great example! Slicing is **REALLY** amazing and
convenience in Python (Also seen it in Matlab, sort of)
OK, I'll give another example, the list comprehension
a = [1,2,3,4]
# now I want [2,4,6,8]
b = [ 2*x for x in a ] # haha!
a**a
发帖数: 416
3
recommand http://www.dabeaz.com/generators/Generators.pdf

and

【在 i*****f 的大作中提到】
: Thanks for sharing, runPy! Great example! Slicing is **REALLY** amazing and
: convenience in Python (Also seen it in Matlab, sort of)
: OK, I'll give another example, the list comprehension
: a = [1,2,3,4]
: # now I want [2,4,6,8]
: b = [ 2*x for x in a ] # haha!

i*****f
发帖数: 578
4
thanks for sharing generators slides!

【在 a**a 的大作中提到】
: recommand http://www.dabeaz.com/generators/Generators.pdf
:
: and

1 (共1页)
相关主题
[合集] quantlib 下面的example 怎么编译?谁给介绍一下Ruby?
求书:Time Series Analysis and Its Applications: With R Examplestbl1.col1 = tbl2.col2 (+)
[转载] Automatic CS Paper GeneratorPython里面为什么range(0,5)不用0:5来表示?
求问一道DP的题,选最大的pizza块如何用matlab构造如下矩阵
Another Easter egg :)))Has any of you tried SmartCode?
新人报道,请问各位大牛如何开始学习python?来几个C++测试题
python 问题 (转载)一道面试题看不懂
如何写适合于自动生成有规范格式文档的doc string问道FB的题
相关话题的讨论汇总
话题: example话题: string话题: python话题: concise话题: syntax