Feb-26-2019, 08:46 AM
(Feb-25-2019, 11:20 AM)erfanakbari1 Wrote: 1.Convert the string to list.
2.Display the first element and last element of list.
3.Display the elements except first and last elements in the list.
4.Display the length of the list.
5.Convert the list back to string and display them.
6.Convert the string to list with respect to spaces i.e ['hello','world'] for input 'hello world'
1. Use one of built-in functions
2. Use subscription
3. Use slicing
4. Use one of built-in functions
5. Use one of built-in functions
6. Use one of string methods
Python names are quite descriptive therefore finding needed on should be quite simple.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.