Question: Write a python program that prints the words and their position using a dictionary. Example: Sample text: As far as the laws of mathematics refer

 Write a python program that prints the words and their position

Write a python program that prints the words and their position using a dictionary. Example: Sample text: As far as the laws of mathematics refer to reality they are not certain as far as they are certain they do not refer to reality" Output: As : 0 far: 1,15 as : 2, 14, 16 the : 3 laws : 4 of : 5 mathematics :6 refer :7,23 to :8,24 reality: 9,25 they : 10,17,20 are :11 not :12,22 certain : 13,19 far:15 are :18 certain:19 do :21 to :24

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!