Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| #!/bin/zsh | |
| curl https://api.vkontakte.ru/method/friends.get\?user_id\=$1 | jq '.response[]' |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Xml.Linq; | |
| class TenCSharpOneLiners | |
| { | |
| static void Main() | |
| { |