Skip to content

Instantly share code, notes, and snippets.

@mos3abof
Last active January 4, 2016 08:29
Show Gist options
  • Save mos3abof/8595780 to your computer and use it in GitHub Desktop.
Save mos3abof/8595780 to your computer and use it in GitHub Desktop.
Calculating different permutations of the democratic path we got in Egypt.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Calculating different permutations of the democratic path we got in Egypt.
from itertools import permutations
i = ['دستور', 'برلمان', 'رئاسة']
results = []
for a in permutations(i, 3):
results.append(a)
for idx, val in enumerate(results):
print 'سيناريو {} : احنا نبدأ بـ"{}"، وبعدين "{}" وفي الآخر "{}"'.format((idx + 1), val[0], val[1], val[2])
print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment