Posts by Rodrigo Abreu • 55 points
2 posts
-
3
votes2
answers55
viewsQ: How to save a dictionary to two independent objects in Python?
Consider the following dictionaries: dic1 = {'k1':'Ford','k2':'GM','k3':'Dodge'} dic2 = {'k4':'Audi','k5':'Mercedes','k6':'VW'} dic3 = {'k7':'Fiat','k8':'Mazda'} The goal is to get two new…
-
2
votes1
answer30
viewsQ: When using the . extend() command in Python, how do you store the result in a new object?
Considering the lists: lista1=["a","b","c","d"] lista2=[5,6,7,8] My goal is to get a new list that has the elements of these two ['a', 'b', 'c', 'd', 5, 6, 7, 8], but preserving them the way they…