ThisisLegal.com

ThisisLegal Forums

Welcome to the forums! A chance for site members to chat and get help.

You are not logged in.

#1 1970-01-01 00:00:00

RaducE
Member
Registered: 2007-09-13
Posts: 27

Problem 2

Sorry but i got this challenge from the net and i can't solve it.Can somebody help me?

The solution is the missing code at Line 7 that will produce the output of a as shown.

1 a = ['Ptah', 'Ra', 'Horus', 'Geb', 'Aten', 'Atum', 'Isis', 'Sobek',]
2 b = ['Thoth', 'Osiris', 'Aten',]
3 a.pop(3)
4 a.remove('Aten')
5 a.pop()
6 b.append('Nut')
7 # Deleted!
8 print a
['Ptah', 'Ra', 'Horus', 'Atum', 'Isis', 'Thoth', 'Osiris', 'Aten', 'Nut']

Offline

#2 1970-01-01 00:00:00

t0mmy9
Administrator
Registered: 2005-01-07
Posts: 21

Re: Problem 2

solved smile

for any one reading this whos curious the answer is

a.extend(b)

i can explain why if you ask.


Site admin

Offline

Board footer

Powered by FluxBB