Programming/Computing Help please Watch

wpton786
Badges: 0
Rep:
?
#1
Report Thread starter 3 years ago
#1
How can I turn an input into a list (in python) and then the words in the sentence are displayed as there position in the list

FOR EXAMPLE:

User inputs a sentence. "Hello my name is bob and I like football".
This is then put into a list.
List("Hello my name is bob and I like football")
The list is then reprinted as [0,1,2,3,4,5,6,7,8,9,10]. Depending on the amount of words in the list.

Can someone please help me.
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts

University open days

  • Bournemouth University
    Clearing Open Day Undergraduate
    Wed, 31 Jul '19
  • Staffordshire University
    Postgraduate open event - Stoke-on-Trent campus Postgraduate
    Wed, 7 Aug '19
  • University of Derby
    Foundation Open Event Further education
    Wed, 7 Aug '19

What are your favourite crisps?

Kettle Chips (8)
13.79%
McCoys Salt and Vinegar (4)
6.9%
McCoys Flame Grilled Steak (2)
3.45%
Walkers Prawn Cockail (9)
15.52%
Monster Munch (6)
10.34%
Pringles (12)
20.69%
Walkers Oven Baked Crisps (4)
6.9%
Walkers Beef and Onion (1)
1.72%
Thai Sweet Chili Sensations (12)
20.69%

Watched Threads

View All