Difference between revisions of "Python-Perl cheatsheet"
Devicerandom (Talk | contribs) (Created page with "{|border="1" style="text-align:center;" cellpadding="10" cellspacing="0" !what !Perl !Python !notes |- |array length |len(array) |$#array | |- |null type |None |undef |...") |
Devicerandom (Talk | contribs) |
||
Line 1: | Line 1: | ||
+ | <!-- | ||
+ | |||
+ | |- | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |||
+ | --> | ||
+ | |||
{|border="1" style="text-align:center;" cellpadding="10" cellspacing="0" | {|border="1" style="text-align:center;" cellpadding="10" cellspacing="0" | ||
!what | !what | ||
− | |||
!Python | !Python | ||
+ | !Perl | ||
!notes | !notes | ||
|- | |- | ||
Line 14: | Line 24: | ||
|undef | |undef | ||
|not exactly identical | |not exactly identical | ||
+ | |- | ||
+ | |String concatenation | ||
+ | |"py"+"thon" | ||
+ | |"pe"."rl" | ||
+ | | | ||
+ | |- | ||
+ | |declare a list | ||
+ | |[1,2,3] | ||
+ | |(1,2,3) | ||
+ | | | ||
+ | |- | ||
+ | | | ||
+ | |range(1,100) | ||
+ | |(1..100) | ||
+ | | | ||
+ | |||
|} | |} | ||
[[Category:Programming]] | [[Category:Programming]] |
Revision as of 12:28, 25 April 2011
what | Python | Perl | notes |
---|---|---|---|
array length | len(array) | $#array | |
null type | None | undef | not exactly identical |
String concatenation | "py"+"thon" | "pe"."rl" | |
declare a list | [1,2,3] | (1,2,3) | |
range(1,100) | (1..100) |