In python the input() function prompts the user to enter information.
A event block i know this im i have been in technology for 5 months
Answer:
new_segment = [ ]
for segment in segments:
new_segment.append({'name': segment, 'average_spend': money})
print( new_segment)
Using list comprehension:
new_segment =[{'name': segment, 'average_spend': money} for segment in segments]
Using map():
def listing(a):
contain = {'name': segment, 'average_spend': money}
return contain
new_segment = [ ]
new_segment.append(map( listing, segment))
print(list(new_segment)
Explanation:
The python codes above create a list of dictionaries in all instances using for loop, for loop in list comprehension and the map function which collect two arguments .
Answer:
Same thing happening to me and several other people. At this point I wonder if there site is having troubles. I tried to email them but even that is not working.
Explanation:.