Feb-25-2019, 11:20 AM
Hey guys , I'm a beginner at Python & I have taken a python course in which i am given some exercises to solve . unfortunately working with strings and lists made me confused so that I don't know how to do these exercises . I will be so happy if you can help me with this .
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'
Thanks for your help guys
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'
Thanks for your help guys