crypto = 'btc'
print(crypto)
btc = 2.5
print(btc)
eth = btc
print(eth)
btc += 3
print(btc)
crypto = [('btc', 2.5), ('eth', 5.5)]
money = crypto
money[0] = 3.5
print(crypto)
print(money)
import copy
crypto = [('btc', 2.5), ('eth', 5.5)]
money = copy.copy(crypto)
money[0] = 3.5
print(crypto)
print(money)
crypto = {'btc': 2.5, 'eth': 4.5, 'ltc': 5}
crypto['btc']
print("J'ai " + str(crypto['btc']) + "BTC (en vrai NON)")
crypto2 = {'eth': 4.5, 'btc': 2.5, 'ltc': 5}
if crypto == crypto2:
print("Les dicos ne sont pas ordonnés")
else:
print("Bien sûr qu'ils le sont andouille.")
for v in crypto.values():
print(v)
for k in crypto.keys():
print(k)
for i in crypto.items():
print(i)
Dans ce cours nous avons vu :