Skip to content

Instantly share code, notes, and snippets.

View cdesaintleger's full-sized avatar

Christophe de saint léger cdesaintleger

View GitHub Profile

Keybase proof

I hereby claim:

  • I am cdesaintleger on github.
  • I am cdsl (https://keybase.io/cdsl) on keybase.
  • I have a public key ASBlWXk5gBV-4uRe79Rb6B5q9STokyjdBSD6FLQHEAtVrgo

To claim this, I am signing this object:

#!/usr/bin/python
# -*- coding:utf-8 -*-
import imaplib
import csv
import email
from time import sleep
from email.Utils import COMMASPACE
MAILFROM = "mail@from.com"
#transformer une chaine en list de tuples
text = "1 2 3 4 5 6"
l = [ int(x) for x in text.split()]
# l = [1, 2, 3, 4, 5, 6]
list_tuples = zip( l[0::2],l[1::2] )
# list_tuples = [(1, 2), (3, 4), (5, 6)]