import base64
import os

# APPROCHE ITERATIVE
def toBase64(path):
    files = os.listdir(path)
    newlist = []
    for f in files:
      newlist.append(base64.encodestring(f))
    return newlist

print "\n".join(toBase64(os.getcwd()))

# APPROCHE EMPLOYANT LA FONCTION MAP
def toBase64a(path):
    return map(base64.encodestring, os.listdir(path))

print "\n".join(toBase64a(os.getcwd()))

# PLUSIEURS ARGUMENTS
def plus(a, b):
    return a + b

print map(plus, (1, 2, 3), (4, 5, 6))
