Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Code-golf is a competition to solve a particular problem in the fewest bytes of source code.
2
votes
Print number triangle
Python 2 - 72
>>> def p(N):print'\n'.join(' '.join(map(str,range(1,i+2)))for i in range(N))
...
>>> p(5)
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
-2
votes
3
answers
125
views
Detect the main order based on sub-lists [closed]
The question is simple but the answer maybe not!
suppose that you have the following lists that all of them are ordered (not consecutive):
x = ['one', 'two', 'four']
y = ['two', 'three', 'five']
z …
4
votes
Sort these James Bond ratings
Python 2, 250 bytes:
lambda I:zip(*sorted({k:v for v,k in[x.split(' ',1)for x in I.split('\n')]if k in'Barry Nelson,Bob Simmons,Sean Connery,Roger Moore,David Niven,George Lazenby,Timothy Dalton,Pierc …