# -*- coding: utf-8 -*-
"""
Created on Mon Jul 11 19:18:33 2022

@author: starons
"""

import numpy as np

# utilisation de listes
# ---------------------
X=[1,2,3]
Y=[4,5,6]
Z=["Soleil"]

print(X+Y)
print("Il s'agit d'une concaténation") 

print(X+Z,"La concaténation c'est rigolo mais en Physique çà sert pas trop !")

n=len(X)
S=[]
for i in range (n):
    S.append(X[i]+Y[i])
print(S)
print("Il s'agit d'une somme élément par élément")

# utilisation de tableaux numpy
# -----------------------------
X=np.array(X)
Y=np.array(Y)
print(X+Y)
print("Avec les tableaux numpy, c'est plus vite écrit !")