aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/examples/howto/groups.py
diff options
context:
space:
mode:
authorBen McGinnes <[email protected]>2018-12-21 10:01:04 +0000
committerBen McGinnes <[email protected]>2018-12-21 10:01:04 +0000
commitdc5f416351e47bfafb46a53f8fd8435dd6c231ba (patch)
tree099f877bf47319cf98efb2d26ea70358c2dd99b9 /lang/python/examples/howto/groups.py
parentpython docs: house keeping (diff)
downloadgpgme-dc5f416351e47bfafb46a53f8fd8435dd6c231ba.tar.gz
gpgme-dc5f416351e47bfafb46a53f8fd8435dd6c231ba.zip
python: groups example
* Tightened code a little more. Signed-off-by: Ben McGinnes <[email protected]>
Diffstat (limited to 'lang/python/examples/howto/groups.py')
-rw-r--r--lang/python/examples/howto/groups.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lang/python/examples/howto/groups.py b/lang/python/examples/howto/groups.py
index 98659cce..81cb6e6a 100644
--- a/lang/python/examples/howto/groups.py
+++ b/lang/python/examples/howto/groups.py
@@ -54,9 +54,9 @@ groups = line.split(":")[-1].replace('"', '').split(',')
group_lines = []
group_lists = []
-for i in range(len(groups)):
- group_lines.append(groups[i].split("="))
- group_lists.append(groups[i].split("="))
+for group in groups:
+ group_lines.append(group.split("="))
+ group_lists.append(group.split("="))
-for i in range(len(group_lists)):
- group_lists[i][1] = group_lists[i][1].split()
+for glist in group_lists:
+ glist[1] = glist[1].split()