Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble in lists
#1
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
Reply


Messages In This Thread
Trouble in lists - by erfanakbari1 - Feb-25-2019, 11:20 AM
RE: Trouble in lists - by Larz60+ - Feb-25-2019, 03:47 PM
RE: Trouble in lists - by perfringo - Feb-26-2019, 08:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trouble displaying items from lists Liquid_Ocelot 8 6,503 May-18-2017, 01:37 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020