Question: Write a Python program that will read a sequence of alphabets in lowercase separated by spaces in a single line according to the ASCII Table.

Write a Python program that will read a sequence of alphabets in lowercase separated by spaces in a single line according to the ASCII Table. Your program should print a list of missing alphabets within the range of the given first alphabet and last alphabet. However, if there are no missing alphabets in between the range, then your program should print the given alphabets as a list.

================================================

Sample Input 1: a b e f i k m n p Sample Output 1: ['c', 'd', 'g', 'h', 'j', 'l', 'o'] Explanation 1: Here, in the given sequence the first alphabet is "a", last alphabet is "p" and 'c', 'd', 'g', 'h', 'j', 'l', 'o' are missing alphabets in between the range. So, the output will be ['c', 'd', 'g', 'h', 'j', 'l', 'o'].

================================================

Sample Input 2: a b c d e f g h Sample Output 2: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'] Explanation 2: Here, in the given sequence the first alphabet is "a", last alphabet is "h" and there are no missing alphabets in between the range. So, the output will be ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'].

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!