On Mon, Jul 15, 2019 at 5:45 AM Ian Kelly wrote:
>
> On Thu, Jul 11, 2019 at 11:10 PM Chris Angelico wrote:
> >
> > On Fri, Jul 12, 2019 at 2:30 PM Aldwin Pollefeyt
> > wrote:
> > >
> > > Wow, I'm so sorry I answered on the question : "How do you replace a
> > > variable with its value". For
On Thu, Jul 11, 2019 at 11:10 PM Chris Angelico wrote:
>
> On Fri, Jul 12, 2019 at 2:30 PM Aldwin Pollefeyt
> wrote:
> >
> > Wow, I'm so sorry I answered on the question : "How do you replace a
> > variable with its value". For what i understood with the example values,
> > CrazyVideoGamez wants
On Fri, Jul 12, 2019 at 2:30 PM Aldwin Pollefeyt
wrote:
>
> Wow, I'm so sorry I answered on the question : "How do you replace a
> variable with its value". For what i understood with the example values,
> CrazyVideoGamez wants 3 variables named like the meal-names in dictionary.
> Yes, it's not
Wow, I'm so sorry I answered on the question : "How do you replace a
variable with its value". For what i understood with the example values,
CrazyVideoGamez wants 3 variables named like the meal-names in dictionary.
Yes, it's not secure unless you work with your own dataset (just like
sending
Aldwin Pollefeyt writes:
> dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
> Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
>
> # Don't ask where I got the dinner from
>
> for meal in dinner.keys():
> exec(meal.replace(' ','_') + ' = list(dinner[meal])')
>
>
On Fri, Jul 12, 2019 at 4:37 AM Terry Reedy wrote:
>
> On 7/11/2019 12:51 AM, Aldwin Pollefeyt wrote:
> > dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
> > Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
> >
> > # Don't ask where I got the dinner from
> >
> > for meal
On 11/07/2019 05:51, Aldwin Pollefeyt wrote:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
exec(meal.replace(' ','_') + ' = list(dinner[meal])')
On 7/11/2019 12:51 AM, Aldwin Pollefeyt wrote:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
exec(meal.replace(' ','_') + ' = list(dinner[meal])')
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
exec(meal.replace(' ','_') + ' = list(dinner[meal])')
print(Starters)
print(Main_Course)
print(Desert)
On 2019-07-11 12:43 AM, CrazyVideoGamez wrote:
How do you replace a variable with its value in python 3.7.2? For example, say
I have:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main Course':['Fish',
'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner
Terry Reedy writes:
> On 7/10/2019 6:37 PM, CrazyVideoGamez wrote:
>
> > and I'm just changing it with the code above (you can find that by
> > printing it out). How can I make separate lists called 'Starters',
> > 'Main Course', and 'Desert'?
>
> starters = dinner['Starters']
> main_course =
On 7/10/2019 6:37 PM, CrazyVideoGamez wrote:
the below twice. Please post just once and be patient for at least a
couple of hours -- or days if not subscribed.
How do you replace a variable with its value in python 3.7.2?
Use the variable (name) in an expression. But this is not what you
How do you replace a variable with its value in python 3.7.2? For example, say
I have:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main Course':['Fish',
'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
meal =
How do you replace a variable with its value in python 3.7.2? For example, say
I have:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main Course':['Fish',
'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
meal =
14 matches
Mail list logo