Download as pdf
Download as pdf
You are on page 1of 7
Dada yp List + Juple + Sol 3 picHonay ‘ ( Lat - Ho jut As an Aequential data Type wv MuléiPle Value to fhe Single Variable gg x -[appe”, poxonser | *® (ection of ite ms enclesel inl 5) » oxdered Can be Gang Ghems Cone age + Hubable , _rocalifted Bu Cfuse Acley a Rane “ of jocles x2 [‘opple’, “care ? Pant (ef 4: 8) op Cosonge banana Ey 73 banana CRongy Hern Presert in Lis ihe [apple ", Nonange'y "borew). X[2\ =" Ppreappke” Paink () op | [ “cpp te ’, Orange’, ‘Pineapph Inset = apk ome after thy we Goakd Accessin4 Hers in Get Access, Re Hemm work he Gelbo Inder nuorlon & ee x. inset Gi ' “Pp Print(x) ray 1 é Cores ' Pine : arp) 'Dgapg.) ‘ices SO “apple? “og os oe Oi el) ‘J x A [oP ‘onan’ “arn'] x a apferd ie "PincaPle +) . Pank(+e) ae [apple . ‘Oxarge',‘Lanana’ , \ Prnearple a Add Bo Spiel Heon in 4Ro ord of the List Extencl *~T appl, “cxange’, “banarai} Yee yn Pirsaappe™ Stenctosy/) pas aco Paint (x) a ie appk’, l Oar e) t Bare y ‘ius’ * pineapple, \ Ste te] Append Aerrertl fon arcthe, Lit. Demo ie Pamore APocfied Aang me is apple’ : OF ange 9] ve zerore (“apple *) paint ea) rates eG iange] Ge ee) _— por Derere. Them PRexenk in FR specified fndlex x= (apple, ‘dare, e banana ") ». PP.) Prind(x) Op [apple 1. banana 2 bern “ -| ‘apple 15 “oxarge a ». Clear() Pid x) BF. i) (fear the entsie Lal . contig Lest Souk. fe liek Ir | abplagebicel order, rimbos dll je Sorted [n Intreasly Ordlen s AP ena enol ofl 7 = (appl ',"orarge’, "barara’) Oe Sas F( oe Osarge”, Nate reclen”), re gente ( sevens - Tue) x Bs List in descendiy | opertts) : watemeler’ } cxarge! | eo Greake a pean tit by Cefng XT Vo pcunge?, eortemalen”, “apple” J 7 stan) paint () o/p ‘ [‘ox0nge ) hers % CoWeckion & Teena enclkead in pasentheses 1) ¥ Lists, tuples are cxclewol andl can be of any tre . + Troma ble, chick mean Hat AGeu MHems ase nor be reals fof : a woalernneben "app ae dea tedl ft pee ice ci nae AIRS =. Bee aa ae kresshn Herm, tm duple | 9 eas 1 ee es oe ) va Actes, Hea therm votR HBe ip Kiet ly \oxargpe/slarae! | dex nurnber . Pempve x = (“aPple ", “aarge’,‘banara’) Pere specified aly on tuple, Convert tepe : #O[oj) et apse ae ©, a 5 7p ard conved back nfo ple apple X =(“apple', "Orange "baron X= Let ( x) Y. semove (“banana”) _Hiteis &_ sarge af nck x{ ‘apple’, "Crarte " bernare’, Nias Steqeolesy') 4 m =tuple Paik (xP: 4) ae i fp op C ogarge’, ‘banana’ ciut ’) Tupk is torndable ¥ CRargin eLernents AD 4uph | us not possthh, Prstead , ovine tose fuple cworth"} * Convert +uple inks Lt- Boe x =('a oes, 407) than change Re them AE * shen again Convet Hie se Hharged Lic bach jofo-tere Pant (2) a A. = (‘apple "Noratge % Yona) Y= List) Y [oJ - ‘cfu? x=tuple(y) (arp, ‘oxargfe’| Lerabina Keo tuple re @ Set # ellection fo Ar 75 items Cnclosedl 5, dusky baaces oe py tems in a Seb fave no tdeprnecl oncler , and can be of any +4 Pe # ets cue mutable — ® puplicate ts not allociad | - Ee apple? Duplrcotes coil be Pynosed| 3 Voxeunge’y ies is apple”, “orange, " banana’, “orange "} pant (3) Yp Frappe |," oxanfe,barnnal] add dolol prow tems In the tof Update ao vpdale methesl +o Combine | +00 pet u ne ? x“ =) apple Bi "ororpe", banare! Ve ; el ku ay “mango” x. update (y) pact (2D flupple, range, “Kaui, rango Mh asad Remove Se Sa Pemor methal 4 Sernove specified Prera from sel. a =f “apple, " ‘Onange', ‘bars Sencve Corarger) Psfrt (x) a Sapph e, ‘banana’ exenle . Te find 4& Values exist’ add (kro) Pafnp (0) %p a cS apple "Ox ange " “barevo'} . Leyes O10P9.€, Ome Tn x alone. Azf1,2,3, 4, 5,64 Ye} 6, 457%, D4 ae lifes ence OY) L253 4g Titersechion inrersecffon Fel cormon values eis both . hy ea 5,¢) HEP oes 2,9, bo} Paint (x. fateuechion(y)) Op {5.4 Aro roetiic Gene AB 4d Poms cOhHD, are not lorem coFtl be fa Re Oud pd seh X= 7 1525354 5,64 dle = § Snare”: ape: 30," Counly °: “odio J X=} "pare?" ohaY, age '; 30 ee eee Print lo) ? Thame? John’ lagers, Court Thin ao er Ove. #5954, &) Print («. SYen meh -deffrena(s) op f12 3354 , 4,29, by OD sxechionay » hk fen of Be$-Vable pairs cecheieh tn cuaby bales $Y ¥ mutell 9 bey- Vale PUY Can be adolel rerrevd, on rd affes ae iced de Ry Bd i pie | “Nawne” + Jan’, Age fgg . * Courthiy "<" Trott”, "Ae? 295 5 Psid-Co) Xp. : nore? ; ‘John? TS 26) \Couwitiy« seedy SS RN aE Se ge erste 4 | Spa SS em dice ww dala pis vale ie Rargieg volves ‘ by hia did § “fxclick-§ " brand”: “Forel”, “brand 9 =" posd”, Mae Soke py Bixecioh es ory eleabic fale, « ore * 11964 * feos”. 196 ly 5 Coles? | sect ohite? | 3 TE sane ?:\Pond lech calle, Jeo "1964 , ‘elbows ce seca fe *J 2208 oo a typas'd20n Pop ee “Name?! “john”, “Age” 1.20, “counitey! : “Trola", 3 vs ae PoP Clge”) Sey 25 da olict = § ‘brane 22" Ford”, “mole ve YM ugtany, "yeas ths 1964 2 4 bt ele) xasgnelet getl Carodlel) 14 eM aston) ; shay yo «=H fag “vaca |) AR Nal Henu(J-> x = diadict, Hen

You might also like